.NET

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

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

184 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: 35
Registered: ‎11-13-2006
Message 2 of 2 (168 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!