Author Topic: Setting a UCS to world using VB.Net COM code or ObjectARX - Solved  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

cannorth

  • Guest
Setting a UCS to world using VB.Net COM code or ObjectARX - Solved
« on: September 26, 2012, 12:13:33 PM »
Hello,

  I'd like to set a UCS to world with VB.Net code.  Unfortunately, I've read on Google there isn't an easy way to do this.  Is there a way to do with COM or there a quick and easy way to do it with VB.Net ObjectARX?

Thanks,

cannorth
« Last Edit: November 02, 2012, 06:08:42 PM by cannorth »

BlackBox

  • King Gator
  • Posts: 3770
Re: Setting a UCS to world using VB.Net COM code or ObjectARX
« Reply #1 on: September 26, 2012, 12:23:46 PM »
Here's an excerpt from Setting the UCS to WCS:

Quote from: Virupaksha Aithal, ADNDevBlog, Setting the UCS to WCS

Below code shows the procedure to set the UCS TO WCS.

Code - vb.net: [Select]
  1.         <CommandMethod("restoreWCS")> _
  2.         Public Sub restoreWCS()
  3.             Dim doc As Document = _
  4.                        Application.DocumentManager.MdiActiveDocument
  5.             Dim ed As Editor = doc.Editor
  6.             ed.CurrentUserCoordinateSystem = Matrix3d.Identity
  7.             ed.Regen()
  8.         End Sub
  9.  
"How we think determines what we do, and what we do determines what we get."

cannorth

  • Guest
Re: Setting a UCS to world using VB.Net COM code or ObjectARX
« Reply #2 on: November 02, 2012, 05:39:53 PM »
This worked for me, thanks.

cannorth

BlackBox

  • King Gator
  • Posts: 3770
Re: Setting a UCS to world using VB.Net COM code or ObjectARX
« Reply #3 on: November 02, 2012, 06:00:19 PM »
This worked for me, thanks.

Happy to help. :beer:
"How we think determines what we do, and what we do determines what we get."