Hello. I want to ask if there is any way to check if an element/body is an instance of another in Archicad 22's API. I have tried many things such as checking Guids of the various components, comparing indexes of polygons. But after much testing, it is extremely difficult to verify whether or not an element still remains an instance of element.
In Archicad 21, I used to be able to extract the ModelerAPI::BaseElem from the ModellerAPI::Element and check the hash value to compare between other base elements to determine whether they share the same geometry. Archicad 22 seems to have deprecated this class and I no longer have access to it.
I much appreciate any advice and apologise if I utilise terms not native to Archicad.
Neither of the above seem to be able to just give me the BaseElemId. The first one requires me to also add a bunch of parameters that I don't know how to initialise and does not seem to accept nullpointers. The second one cannot work because it is a void function and thus does not return anything. Is there an example I can refer to as reference with regards to using this function?
Hi, I'm looking into a similar issue and would need clarification.
Let's say I have 2 chairs placed & orientated at different locations of the model. If I just extract the geometries of the Elements via their mesh bodies, each chair will have vertices at different spots (eg: the object's tranformation appears to be baked into the vertices I obtain).
Are you saying that if I use BaseElemId, I will be able to get the same hash for two objects that are placed at different locations, and that to extract the vertices in local coordinate of the bodies, I will need to multiply the vertices by the inverse of ModelerAPI::Element.GetElemLocalToWorldTransformation() for one of them?