AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there any API which can tell us if any object is selected in the drawing in AutoCAD Plant3D without prompting user for object selection?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
vaishnavi_agrawalSJ2Y6
119 Views, 1 Reply

Is there any API which can tell us if any object is selected in the drawing in AutoCAD Plant3D without prompting user for object selection?

Hi,

 

I have written one command which does some operation on the object that is selected in AutoCAD plant3D drawing. The workflow is such a way that user selects the object and then calls the command. I am using Editor.GetSelection() API to get the object selected in the drawing, however when no object is selected in the drawing this API prompts user to select the object, but in this case I want to terminate the operation.

Is there any way/API which can tell me that no object is selected in drawing without prompting the user for object selection so that I can terminate the operation programmatically via .NET

1 REPLY 1
Message 2 of 2

try to return the selection result then get the status if not ok.

PromptSelectionResult promptSelectionResult = ed.GetSelection();
if (startPointResult.Status != PromptStatus.OK)
return;

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

Post to forums  

Technology Administrators


AutoCAD Beta