Hi, thanks for you suggestion.
Now I have a further question:
How to obtain a geometry object from a LINKED element.
I use PickObject() with ObjectType.PointOnElement to get a Reference object.
If I pick an Element in the host (current/main/master, whatever you call it) document,
<elemInHostDoc>.GetGeometryObjectFromReference(refPickedInHostDoc)
The above method works just fine for me.
As I had tested: ObjectType.PointOnElement can pick both in host document and in linked document.
If I pick an Element in a linked document, for example, I click a surface of a rectangular Duct, API gave me back a Reference object of which the ElementReferenceType property is SURFACE.
I had tried calling GetGeometryObjectFromReference in the following 2 ways:
1.
<elemInLinkDoc>.GetGeometryObjectFromReference(pickedRef)
// throw exception : The id of this element is not same as that referenced by reference
Parameter name: reference
2.
<rvtLinkInstanceElement>.GetGeometryObjectFromReference(pickedRef)
// returns <null>
Sooo, How can I obtain a geometry object from a link Element?
Thanks !
单身狗;代码狗;健身狗;jolinpiggy@hotmail.com