Author Topic: Is there a .NET equivalent of the PLAN command?  (Read 1580 times)

0 Members and 1 Guest are viewing this topic.

vegbruiser

  • Guest
Is there a .NET equivalent of the PLAN command?
« 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 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) 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.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Is there a .NET equivalent of the PLAN command?
« Reply #1 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:
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions