TheSwamp

Code Red => .NET => Topic started by: vegbruiser on December 17, 2010, 10:43:06 AM

Title: Is there a .NET equivalent of the PLAN command?
Post by: vegbruiser on December 17, 2010, 10:43:06 AM
Hi all,

I finally managed to get my viewport to follow the correct UCS, (thanks in no small part to this (http://www.theswamp.org/index.php?topic=23988.msg290498#msg290498) post from Daniel) but now I'm struggling to work out whether I can use hitherto-unknown-to-me functionality to produce the same effect as the plan command.

(I realise there's an option you can check called "Update view to Plan when UCS is changed" (from here (http://www.cad-addict.com/2007/11/autocad-activate-or-deactivate.html)) that will rotate the view for you when you change the current UCS, but even this still needs the PLAN command.)

For those of you who don't know what this command does, create a custom ucs in modelspace, and give it a name.

then go into paperspace, double click in a viewport and start the plan command. select UCS then type the name of your custom UCS.

the view will swing round and align to the custom UCS.

Any ideas how I can achieve the same effect without resorting to SendStringToExecute()?

Thanks in advance.

Alex.
Title: Re: Is there a .NET equivalent of the PLAN command?
Post by: mohnston on December 17, 2010, 01:43:21 PM
Haven't tried it but the API has:

public void SetViewDirection(Autodesk.AutoCAD.DatabaseServices.OrthographicView view)
    Member of Autodesk.AutoCAD.DatabaseServices.Viewport

OrthographicView has these enums: