Hi,
I need to create programmatically an element, the same way you can do as a user with the keyin "move parallel offset" with "Mode: Miter", "make copy" and "Distance" set.
What would be the function to use to get a similar result? I wouldn't mind importing an MDL Function if the .NET Interop API doesn't has this.
None of the documents in the SDK provide any results when searching for "miter", "bevel" or "move parallel"
The KeyIn is not usable, sincea) it needs several user interactions (selecting the object, despite being already selected before the command was started. selecting on which side the copy should be created)b) the selected element will be later only created temporarily, and not a part of the dgnc) the Miter copied element is only needed temporarily as well, for further intersection calculations
With regards,
PatB
PatB said:I need to create programmatically an element
The closest function is MDL mdlElmdscr_copyParallel(): This is the same result as obtained by the MicroStation COPY PARALLEL... key-ins.
mdlElmdscr_copyParallel()
Perhaps someone can tell us if there is a C++ class with a similar method, and whether there is a .NET class that wraps the C++ API.
PatB said:None of the documents in the SDK provide any results when searching for "miter", "bevel" or "move parallel"
Move parallel doesn't exist because the MicroStation idiom is copy parallel. To move something, create a transaction: make a copy, perform the transformation, and remove the original if the transformation succeeded. That way, MIcroStation's undo logic is engaged.
You'll have to write your own code to create a miter or bevel.
Regards, Jon Summers LA Solutions
Hi Jon Summers ,
The .NET API closest to a "copy parallel" is CurveVector: CloneOffsetCurvesXY (and similarly, AreaOffset) that unless processing very straight-forward simple segment curves; unfortunately can result in producing self-intersecting offset curves as mentioned by YongAn in this thread.
HTH,Bob
That linked post ends unresolved with an "error code 5019"
Can we get a fully functioning code example?
On a side note: i got the following message "An error occurred. Please try again or contact your administrator." on my first try to reply
PatB said:That linked post ends unresolved
It works for me.