.NET

Reply
Active Member
dshKSS
Posts: 6
Registered: ‎04-18-2013
Message 1 of 2 (167 Views)

Calling rotate with a SelectionSet

167 Views, 1 Replies
04-18-2013 07:59 AM

I have overriden the rotate command to get a selection set and do something extra if it contains one of our custom objects.

 

However if it contains any standard autocad objects I want to recall the original autocad rotate command with a SelectionSet of these objects.

 

I know I can call the rotate command using:

 

acedCommandS(5005, __arglist("._ROTATE"5005"\\"5000));

However this will call the rotate command from the start and ask for a new selection set. Is there a way to call this with my selection set?

 

*Expert Elite*
norman.yuan
Posts: 1,014
Registered: ‎04-27-2009
Message 2 of 2 (140 Views)

Re: Calling rotate with a SelectionSet

04-18-2013 10:27 AM in reply to: dshKSS

I am not very sure I know exactly what you want, but sounds like you want a command applies different action to  a set of selected entities, depending on one or more properties of the entities.

 

You might want to look into TransformOverrule that only applies to your "custom object" (assuming this "custom object" is an AutoCAD entity, otherwise you may not be able to do anything with .NET API). This way, the command Rotate (or any other command, for that matter) just acts normally, and your TransformOverrule will automatically take over when AutoCAD tries to rotate the targeting entity (your custom object) and transform it in however the way you want to.

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.