.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

entities modify

1 REPLY 1
Reply
Message 1 of 2
danny.boy.1
371 Views, 1 Reply

entities modify

Hello!

 

Does somebody know how is posible to get which

entities user want to modify:

 

User can select entities and then start to copy, move, etc...

 

or

 

User can run command and then select to copy, move, etc...

 

Is there some way to we catch, before entities are started to modify,

which entities are selected (as list od objectids, or list of entites)?

 

Best regards,

Danijel

1 REPLY 1
Message 2 of 2
Paulio
in reply to: danny.boy.1

Do you mean you want to run your code using the items the user has preselected before running your command?

 

If so, you need to add CommandFlags.UsePickSet to the CommandMethod attribute of your command, then in your code you can get the implied selection. If that comes back empty then you can ask the user to select something.

Something like this:

	Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim ed As Editor = doc.Editor
        Dim objIDs() As ObjectId = Nothing
        Dim pres As PromptSelectionResult = ed.SelectImplied()
        If pres.Status <> PromptStatus.OK Then
            'do stuff here to get your user to select items
        Else
            objIDs = pres.Value.GetObjectIds
        End If

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost