Hi Experts,
I have a simple model with Just one Cell, then I copy the Cell and place the copied Cell to the model twice, the model looks as below, and i have attached the .dgn model
I am running a Microstation CE.
copied items.dgn
now with the api, i can get 3 cells, the quesiton is that how can i check whether those cells have the same geometry, only difference is the postion/transformation. is it possible to tell the source Cell of a copied cell.
I just want to know those cells have the same geometry(except the position/transformation).
thanks,
Rick
Hi Rick cheng
Although other element comparison APIs may exist, I (quickly) found two MDL native C API functions that may help.
Hint: If you transform both elements to the identity (in memory) you may be able to use the first function, otherwise the 2nd function provides the most flexibility of this otherwise complex topic.
HTH,Bob
Hi Bob,
Robert Hook said:Although other element comparison APIs may exist, I (quickly) found two MDL native C API functions that may help.
That's great, I still thought I saw some comparison function in the past, but was not able to find it ;-)
Although it's another question, it would be nice to develop this topic further from API development perspective, because CE API has moved from C style based on data structures to OOP access based on element handlers, where underlying data structures are not visible as not important. So it would be nice to know what approach can be used to achieve the same but without working with ElmDscr.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thanks Bob, I will have a try with those api to varify whether it works for my case. where I just copied a cell multiple times.
Hi Jan,
Yes, I certainly agree this could be a fine: a.) API enhancement, and b.) source code "diffing example" for inclusion in the SDK.
Once MSCE SDK U12 goes out I will return to adding these to our backlog items.
Thank you,Bob