.NET

.NET

Reply
Valued Contributor
swaywood
Posts: 91
Registered: ‎08-22-2013
Message 1 of 2 (188 Views)
Accepted Solution

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

188 Views, 1 Replies
03-10-2014 04:44 AM

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

 

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

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

Active Contributor
matt.worland
Posts: 36
Registered: ‎11-13-2006
Message 2 of 2 (172 Views)

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

03-10-2014 09:14 AM in reply to: swaywood

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

matt worland
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.