20 Posts
1 Kudo
Registered: ‎11-09-2011
Post 1 of 1

Trace boundary with Nested object of X-ref

144 Views, 0 Replies
01-23-2013 03:54 AM



I am x-referencing A.dwg to B.dwg. Now I want to get the properties of A.dwg when I am clicking on any entity in B.dwg. For this I am using the Nested concept, the code for which I am pasting below.


Dim PrNestOps As New PromptNestedEntityOptions("Pick Nested Entity")
PrNestOps.AllowNone = False
PrNestOps.UseNonInteractivePickPoint = False
'set that to true and supply a point to NonInteractivePickPoint if you want to get an entity at a known point without prompting the user
Dim pner As PromptNestedEntityResult = acdocs.MdiActiveDocument.Editor.GetNestedEntity(PrNestOps)
If pner.Status = PromptStatus.OK Then
  Dim nestedID As ObjectId = pner.ObjectId 'this is the id of the most deeply nested object at the picked point
  Dim pickpt As Point3d = pner.PickedPoint
  Dim ParentIds As New ObjectIdCollection(pner.GetContainers) 'this is the Ids of all the container objects
End If

 Here when I click on a closed polyline, I am able to get the ObjectID and the associated properties. But now I want that when I click on the center point inside the closed polyline, it should be able to trace/find the associated polyline for the center point, give me the ObjectID.


Please let me know the code that needs to be used for the same.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post