Jump to content

UCS world in VB.net


Jozi68

Recommended Posts

Hi All,

I'm using vb.net to write a DLL that I can load with netload.

How can I set the drawing's UCS to world in VB?

All suggestions are appreciated.

Jozi68

Link to comment
Share on other sites

  • 1 month later...

Coordinate systems are associated with viewports. So, if a viewport were aquired (via a transaction with Editor.ActiveViewportId, perhaps) then it’s coordinate system could be changed with Viewport.SetUcsToWorld.

Link to comment
Share on other sites

I am not using viewports at the moment, but not all drawings are set to ucs world.

Surely there should be a way to change a drawing to ucs world (while in model)?

Link to comment
Share on other sites

Hi,

 

This sould work for the current viewport (C# code, I let you translate)

 

Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.CurrentUserCoordinateSystem = new Matrix3d(new double[16]{
   1.0, 0.0, 0.0, 0.0,
   0.0, 1.0, 0.0, 0.0,
   0.0, 0.0, 1.0, 0.0,
   0.0, 0.0, 0.0, 1.0});

Link to comment
Share on other sites

I’ve got to plead guilty to giving bad advice with the Viewport.SetUcsToWorld recommendation. Quite frankly, I can’t find a scenario where that method works as advertised. If it does perform some task, it isn’t what I assumed it would be.

Link to comment
Share on other sites

Thanks gile, it seems to work. Now I just need a way to make sure the user is actually in model (NOT paper).

No problem Seant, you've already helped me more than anyone else.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...