In a previous post I went over how one could use the API to create 3DPolylines from a corridor in one step rather than selecting them one at a time. In this post I’ll show how to turn them into feature lines. As a starting point I’ll be using the code from the previous post. I’ll be adding the code to the spot indicated below:
The fist thing I need is to get the site I want the feature line added to. To do this I need to get the Site object I want the feature line to go to. I’ll use the code that comes with the samples to get the drawings database and add it as a new module.
I’ll now call the function within the code to get the g_oDocument assigned and use it to get the first site in the drawing to assign to the created feature lines to. I’ll also get the first feature line style in the drawing’s list. Finally the 3DPolyline will be used to create a feature line.
I probably don’t want to keep the 3DPolyline so I’ll delete it.
And now when the code is run it will create feature lines from the corridor based on what the user types in.
No comments:
Post a Comment