.NET

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

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

176 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 (160 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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.