Hello,
could someone show me (with a code example) how to perform, in c #, the Split operation on a Shape element?
Thanks for your help,regards
Salvio Montella
willmartinpe said:Too split a polygon
This is the Programming Forum. You have described the steps to split a polygon using MicroStation's built-in tools. How does that help the OP, who wants to write C# code?
Regards, Jon Summers LA Solutions
Too split a polygon:
Draw the line splitter crossing the edges
Zoom out until you can see the entire polygon.
Create a region in one part of the proposed new polygon checking 'Keep Original'.
Create a region in the other part of the proposed polygon unchecking 'Keep Original'.
Hi Salvatore,
salvatore montella said:The versions they use are as follows
it's not very important when NET only is used, but it's incorrect (not supported option) to use different version of MicroStation and different version of SDK together! Why to do so dirty development thing?
salvatore montella said:The Split operation (required) should consist
Sorry, but it tells not too much and nothing about how the shape should be split. As Jon Summers wrote: What is "a sort of matrix"?
salvatore montella said:The Split operation (required) should consist of selecting a shape, applying a sort of matrix,and replicate the selected object for how many elements are in the array.
It sounds like quite complex code, so it seems to be more like "write some code for me", especially when it very different from your original question that was "how to split a shape", whereas now it "select element, make calculations, save changes to design file", moreover applied to an array (which is also not quite clear how it should work).
I recommend to start with MicroStation SDK examples to learn how to implement element location (modification) class and to implement a minimum set of features (to be able to locate shape and something like to remove the shape and place a circle in a middle of the shape). Until it works, how exactly the split should be implemented probably makes no sense.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
salvatore montella said:The Split operation (required) should consist of selecting a shape, applying a sort of matrix,and replicate the selected object for how many elements are in the array
Well, that's one of the more imaginative specifications I have seen!
salvatore montella said:replicate the selected object for how many elements are in the array
Hi Jan,
Hi Salvio,
there are several problems in your question: