All,
I am wondering if there is a way to select a single entity (with the cursor) from an XREF object embedded within my current active drawing. I can use GetEntity to determine what objects are part of my xref, but I need to identify certain pieces as points of reference.
So if I have a large drawing of circuits (single line) and what not, I want to be able to point at a specific circuit segment and get length and width information for the line representation of that circuit line.
Kyle
It is unclear from your question wether you are using the Managed API or COM (or VB or C#). If you're using COM, then I think there is a GetSubEntity in Utility. I don't have an example that hasn't been upgraded to the Managed API.
If you are using the Managed API It goes like this: (ApplicationServices and EditorInput Imported)
Dim PrNestOps As New PromptNestedEntityOptions("Select Xref Object:")
PrNestOps.AllowNone = False
PrNestOps.UseNonInteractivePickPoint = False
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim PrNentRes As PromptNestedEntityResult = ed.GetNestedEntity(PrNestOps)
If PrNentRes.Status = PromptStatus.OK Then
'PrNentRes.ObjectId is the ID of the base object picked
'PrNentRes.PickedPoint =the point picked
'PrNentRes.Transform = the block transform to convert points and angles to WCS
'PrNentRes.GetContainers() returns an array of ObjectID's pointing to each container object
End If
Yes, I am using the Managed API (C# specifically). I will give this a shot, thank you for your response.