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
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