how to get the objectid of a line in a blockreference by mouse select?

how to get the objectid of a line in a blockreference by mouse select?

swaywood
Collaborator Collaborator
661 Views
1 Reply
Message 1 of 2

how to get the objectid of a line in a blockreference by mouse select?

swaywood
Collaborator
Collaborator

how to get the objectid of a line in a blockreference by mouse select?

 

anybody done this? please give me some code. thanks.

0 Likes
Accepted solutions (1)
662 Views
1 Reply
Reply (1)
Message 2 of 2

matt.worland
Advisor
Advisor
Accepted solution

Minimilist code:

Dim myDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim myEd As Editor = myDoc.Editor
Dim myPEO As New PromptNestedEntityOptions("Select line in block:")
Dim myPER As PromptNestedEntityResult = myEd.GetNestedEntity(myPEO )
myPER .ObjectId

 This should return the object ID of the entity selected.

 

matt

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"