.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 7
sist111
445 Views, 6 Replies

selection

Can anyone advice how to get selection (highlighted with grips) to work with using AutoCad commands the same way as I selected it on screen?
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: sist111

From a registered command handler, add the CommandFlags.UsePickSet flag to
the CommandMethod attribute, and the current selection will be used when you
call any Editor method that prompts for multiple objects, or when you call
the Editor's SelectImplied() method.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6296504@discussion.autodesk.com...
Can anyone advice how to get selection (highlighted with grips) to work with
using AutoCad commands the same way as I selected it on screen?
Message 3 of 7
sist111
in reply to: sist111

Thank you, Tony Tanzillo, but I ment something different. I ment that class is terminated, and left only three of us: AutoCad, me and selection.
Now when i use:

editor.SetImpliedSelection(objectIds);
promptSelectionResult = editor.GetSelection();

I have only command string message "[number] found" and can use "select -> previous" command (or "previous" within command). But I'd like the result as command QuickSelect has, for example - selection with blue grips and highlited.
Message 4 of 7
Anonymous
in reply to: sist111

add the follow line below your promptSelectionResult to show your grips.

editor.SetImpliedSelection(promptSelectionResult.Value);


wrote in message news:6297071@discussion.autodesk.com...
Thank you, Tony Tanzillo, but I ment something different. I ment that class
is terminated, and left only three of us: AutoCad, me and selection.
Now when i use:

editor.SetImpliedSelection(objectIds);
promptSelectionResult = editor.GetSelection();

I have only command string message "[number] found" and can use "select ->
previous" command (or "previous" within command). But I'd like the result as
command QuickSelect has, for example - selection with blue grips and
highlited.
Message 5 of 7
sist111
in reply to: sist111

promptSelectionResult.Value is SelectionSet, SetImpliedSelection needs ObjectId[].
Message 6 of 7
Anonymous
in reply to: sist111

Add the CommandFlags.Redraw flag in your CommandMethod attribute, and call
SetImpliedSelection() and pass it the array of objectids that you want to
leave selected.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6297071@discussion.autodesk.com...
Thank you, Tony Tanzillo, but I ment something different. I ment that class
is terminated, and left only three of us: AutoCad, me and selection.
Now when i use:

editor.SetImpliedSelection(objectIds);
promptSelectionResult = editor.GetSelection();

I have only command string message "[number] found" and can use "select ->
previous" command (or "previous" within command). But I'd like the result as
command QuickSelect has, for example - selection with blue grips and
highlited.
Message 7 of 7
Anonymous
in reply to: sist111

The code at the following link shows how to leave objects selected when a
custom command ends:

http://www.caddzone.com/BlockExplodeHelper.cs


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6297330@discussion.autodesk.com...
promptSelectionResult.Value is SelectionSet, SetImpliedSelection needs
ObjectId[].

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