<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Rotating UCS and Plan command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3282967#M57915</link>
    <description>&lt;P&gt;Just an update for those that may be following along...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this working by using a workaround (enabling the UCSFOLLOW system variable), but would eventually like to get it working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a side note... adding Editor.UpdateTiledViewportsFromDatabase() to update the new UCS names in the UCSII toolbar properly "breaks" the UCSFOLLOW functionality. &amp;nbsp;Unfortuantely, if&amp;nbsp;&lt;SPAN&gt;Editor.UpdateTiledViewportsFromDatabase() is not used, then the current UCS name is not shown in the UCSII toolbar dropdown. &amp;nbsp;Probably just doing something wrong.&amp;nbsp;&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2012 23:39:41 GMT</pubDate>
    <dc:creator>Rob.O</dc:creator>
    <dc:date>2012-01-05T23:39:41Z</dc:date>
    <item>
      <title>Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273661#M57906</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions about UCS creation/rotation and the AutoCAD PLAN command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 1) I am creating a new UCS, rotating it based on user picks and saving it. &amp;nbsp;The problem is that it saves the new UCS origin location, but it will not save the rotation. &amp;nbsp;The code I am using was pieced together from a couple of different sources (.NET developers guide and code from Tony T from an old thread) &amp;nbsp;How can I make the new UCS "save" the rotation as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2) Once I have the new UCS created, I want to esentially use the AutoCAD PLAN command and rotate to the name of the new UCS that was just created. &amp;nbsp;I cannot find ANY info anywhere on the internet on how to replicate the PLAN command using .NET. &amp;nbsp;Any advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I am using to create, rotate and save the UCS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim acDoc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
        Dim acCurDb As Database = acDoc.Database
        Dim acEd As Editor = acDoc.Editor
        Dim acEnt As Entity = Nothing

        Dim Zaxis As Vector3d

        Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
            Try

                ' Check for the exisitence of required blocks ***************************************************************************
                ' Declare block variables
                Dim strBlockName As String = "UCS-View"
                Dim strLayerName As String = "DEFPOINTS"
                Dim strSource As String = "W:\EnConDesignContent\Templates\ECDT_NW_11x17_ShopBorder_Template.dwg"
                Functions.CheckBlockInsert(strBlockName, strSource)

                Dim strtPnt As Point3d = Nothing
                Dim endPnt As Point3d = Nothing

                Dim myPromptPointFirst As New PromptPointOptions("")
                Dim myPromptPointFirst_Res As PromptPointResult

                Dim myPromptPointSecond As New PromptPointOptions("")
                Dim myPromptPointSecond_Res As PromptPointResult

                myPromptPointFirst.Message = vbCr &amp;amp; "Select first UCS point"

                myPromptPointFirst.AllowArbitraryInput = False
                myPromptPointFirst.AllowNone = False
RePick1:
                myPromptPointFirst_Res = acEd.GetPoint(myPromptPointFirst)

                '' If pick is ok, then continue
                If myPromptPointFirst_Res.Status = PromptStatus.OK Then
                    myPromptPointSecond.BasePoint = myPromptPointFirst_Res.Value
                    myPromptPointSecond.UseBasePoint = True '' Applies rubberband effect after first pick

                    myPromptPointSecond.Message = vbCr &amp;amp; "Select second UCS point"
RePick2:
                    myPromptPointSecond_Res = acEd.GetPoint(myPromptPointSecond)

                    '' If pick is ok, then continue
                    If myPromptPointSecond_Res.Status = PromptStatus.OK Then
                        strtPnt = myPromptPointFirst_Res.Value
                        endPnt = myPromptPointSecond_Res.Value

                        Dim acLine As Line = New Line(strtPnt, endPnt)
                        Functions.AddToModelSpace(HostApplicationServices.WorkingDatabase, acLine)

                        acEnt = acLine
                        Dim dblAngle As Double = acLine.Angle
                        Zaxis = acEnt.Ecs.CoordinateSystem3d.Zaxis

                        '' Open the UCS table for read
                        Dim acUCSTbl As UcsTable
                        acUCSTbl = acTrans.GetObject(acCurDb.UcsTableId, OpenMode.ForRead)

                        Dim acUCSTblRec As UcsTableRecord

                        '' Check to see if the "New_UCS" UCS table record exists (if not, create it)
                        If acUCSTbl.Has("New_UCS") = False Then
                            acUCSTblRec = New UcsTableRecord()
                            acUCSTblRec.Name = "New_UCS"

                            '' Open the UCSTable for write
                            acUCSTbl.UpgradeOpen()

                            '' Add the new UCS table record
                            acUCSTbl.Add(acUCSTblRec)
                            acTrans.AddNewlyCreatedDBObject(acUCSTblRec, True)
                        Else
                            acUCSTblRec = acTrans.GetObject(acUCSTbl("New_UCS"), OpenMode.ForWrite)
                        End If

			'' Set origin of UCS icon
                        acUCSTblRec.Origin = New Point3d(strtPnt.X, strtPnt.Y, strtPnt.Z)
                        
                        '' Open the active viewport
                        Dim acVportTblRec As ViewportTableRecord
                        acVportTblRec = acTrans.GetObject(acDoc.Editor.ActiveViewportId, OpenMode.ForWrite)

                        '' Display the UCS Icon at the origin of the current viewport
                        acVportTblRec.IconAtOrigin = True
                        acVportTblRec.IconEnabled = True

                        '' Set the UCS current
                        acVportTblRec.SetUcs(acUCSTblRec.ObjectId)
                        'acDoc.Editor.UpdateTiledViewportsFromDatabase()

			'' Rotate the UCS
                        Dim mat As Matrix3d = acEd.CurrentUserCoordinateSystem
                        mat *= Matrix3d.Rotation(dblAngle, Zaxis, strtPnt)
                        acEd.CurrentUserCoordinateSystem = mat

                        '' Display the name of the current UCS
                        Dim acUCSTblRecActive As UcsTableRecord
                        acUCSTblRecActive = acTrans.GetObject(acVportTblRec.UcsName, OpenMode.ForRead)

                        Application.ShowAlertDialog("The current UCS is: " &amp;amp; acUCSTblRecActive.Name)

                        '' Insert view block and rotate it to angle based on UCS selection
                        Dim acBT As BlockTable = acCurDb.BlockTableId.GetObject(OpenMode.ForRead)
                        Dim acBtr As BlockTableRecord = acBT(BlockTableRecord.ModelSpace).GetObject(OpenMode.ForWrite)

                        Dim blkref As New BlockReference(strtPnt, acBT(strBlockName))
                        blkref.Layer = strLayerName
                        blkref.Rotation = dblAngle
                        Functions.AddToModelSpace(HostApplicationServices.WorkingDatabase, blkref)

			'' Zoom to the extents of the blockref
                        Dim chkId As ObjectId = blkref.ObjectId
                        Functions.ZoomObjects(New ObjectIdCollection() From {chkId})

                    ElseIf myPromptPointSecond_Res.Status = PromptStatus.Cancel Then
                        Exit Sub
                    ElseIf myPromptPointSecond_Res.Status = PromptStatus.Error Then
                        MsgBox("Not a vaild point. Please try again!", , "Invalid Point")
                        GoTo RePick1
                    ElseIf myPromptPointSecond_Res.Status = Nothing Then
                        '' Missed pick... retry
                        GoTo RePick1
                    End If
                ElseIf myPromptPointFirst_Res.Status = PromptStatus.Cancel Then
                    Exit Sub
                ElseIf myPromptPointFirst_Res.Status = PromptStatus.Error Then
                    MsgBox("Not a vaild point. Please try again!", , "Invalid Point")
                    GoTo RePick2
                ElseIf myPromptPointFirst_Res.Status = Nothing Then
                    '' Missed pick... retry
                    GoTo RePick2
                End If

            Catch acErrTB As Autodesk.AutoCAD.Runtime.Exception
                MsgBox("An error has occured. Contact your system adminstrator." &amp;amp; vbLf &amp;amp; vbLf &amp;amp; acErrTB.Message &amp;amp; vbLf &amp;amp; acErrTB.StackTrace)
            Finally
            End Try

            acTrans.Commit()
        End Using&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 19:11:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273661#M57906</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2011-12-23T19:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273683#M57907</link>
      <description>&lt;LI-SPOILER&gt;&amp;nbsp;&lt;/LI-SPOILER&gt;&lt;P&gt;On the quick glance I could not&amp;nbsp;found where you&amp;nbsp;put the&amp;nbsp;axis vectors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="1"&gt;acUCSTblRec.Origin= ...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="1"&gt;acUCSTblRec.XAxis=&lt;/FONT&gt;&lt;FONT color="#000000" size="1"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;Vector3d&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="1"&gt;acUCSTblRec.YAxis=&lt;/FONT&gt;&lt;FONT color="#000000" size="1"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;Vector3d&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;FONT face="Consolas"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 19:45:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273683#M57907</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-12-23T19:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273723#M57908</link>
      <description>&lt;P&gt;I originally tried putting the axis vectors in for X and Y, but I kept getting a malformed UCS when I would run the code. &amp;nbsp;It still rotates the UCS properly when I run the code without the axis vectors, but it just does not save the rotation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess my issue was that I could not figure out how to code the axis vectors on a rotated UCS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 20:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273723#M57908</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2011-12-23T20:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273735#M57909</link>
      <description>&lt;P&gt;Not sure if this helps, I used it with success on 2005 earlier:&lt;/P&gt;&lt;PRE&gt;        Public Sub UcsByLine(ByVal ed As Editor, ByVal p1 As Point3d, ByVal p2 As Point3d)

            Dim zAxis As Vector3d = ed.CurrentUserCoordinateSystem.CoordinateSystem3d.Zaxis
            Dim xAxis As Vector3d = p1.GetVectorTo(p2)
            Dim yAxis As Vector3d = xAxis.GetPerpendicularVector 'zAxis.CrossProduct(xAxis)
            Dim mat As Matrix3d = Matrix3d.AlignCoordinateSystem(Point3d.Origin, Vector3d.XAxis, Vector3d.YAxis, Vector3d.ZAxis, p1, xAxis, yAxis, zAxis)
            ed.CurrentUserCoordinateSystem = mat
        End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000" face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 21:12:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273735#M57909</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-12-23T21:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273747#M57910</link>
      <description>&lt;P&gt;Hmmm... I am getting the same results even with your code. &amp;nbsp;The UCS rotates, but does not save the rotation to the new UCS name. &amp;nbsp;I must be doing something wrong!&amp;nbsp;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://forums.autodesk.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 22:29:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273747#M57910</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2011-12-23T22:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273771#M57911</link>
      <description>&lt;P&gt;Ok... think I got it! &amp;nbsp;I had to pass the Xaxis and Yaxis parmeters to the UCSTableRecord in order for it to save!!! &amp;nbsp;You were right on both counts Hallex, but it took me some time to catch on!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acUCSTblRec.XAxis = New Vector3d(Xaxis.X, Xaxis.Y, Xaxis.Z)
 acUCSTblRec.YAxis = New Vector3d(yAxis.X, yAxis.Y, yAxis.Z)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on the PLAN command and I how I can replicate that in .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 23:44:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273771#M57911</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2011-12-23T23:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273803#M57912</link>
      <description>&lt;P&gt;ed.SetCurrentView(view);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=40077.msg453446#msg453446" target="_blank"&gt;http://www.theswamp.org/index.php?topic=40077.msg453446#msg453446&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Dec 2011 02:12:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273803#M57912</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2011-12-24T02:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273997#M57913</link>
      <description>&lt;P&gt;Sorry for the belating&lt;/P&gt;&lt;P&gt;I was&amp;nbsp;just quickly rewrote the online primer&lt;/P&gt;&lt;P&gt;See if this work for you&lt;/P&gt;&lt;PRE&gt;        &amp;lt;CommandMethod("NewUCS")&amp;gt; _
        Public Sub NewUCS()
            '' Get the current document and database, and start a transaction
            Dim doc As Document = Application.DocumentManager.MdiActiveDocument
            Dim db As Database = doc.Database
            Dim ed As Editor = doc.Editor
            Dim pso As New PromptEntityOptions(vbCr &amp;amp; "Select a line : ")
            pso.SetRejectMessage(vbLf &amp;amp; " Select a line only!")
            pso.AddAllowedClass(GetType(Line), False)
            Dim psr As PromptEntityResult = ed.GetEntity(pso)
            If psr.Status &amp;lt;&amp;gt; PromptStatus.OK Then
                Return
            End If
            Dim id As ObjectId = psr.ObjectId


            Using tr As Transaction = db.TransactionManager.StartTransaction()
                Dim ent As Entity = tr.GetObject(id, OpenMode.ForRead)
                Dim ln As Line = DirectCast(ent, Line)
                '' Open the UCS table for read
                Dim acUCSTbl As UcsTable
                acUCSTbl = tr.GetObject(db.UcsTableId, _
                                             OpenMode.ForRead)

                Dim acUCSTblRec As UcsTableRecord

                '' Check to see if the "New_UCS" UCS table record exists
                If acUCSTbl.Has("New_UCS") = False Then
                    acUCSTblRec = New UcsTableRecord()
                    acUCSTblRec.Name = "New_UCS"

                    '' Open the UCSTable for write
                    acUCSTbl.UpgradeOpen()

                    '' Add the new UCS table record
                    acUCSTbl.Add(acUCSTblRec)
                    tr.AddNewlyCreatedDBObject(acUCSTblRec, True)
                Else
                    acUCSTblRec = tr.GetObject(acUCSTbl("New_UCS"), _
                                                    OpenMode.ForWrite)
                End If

                acUCSTblRec.Origin = ln.StartPoint
                acUCSTblRec.XAxis = ln.StartPoint.GetVectorTo(ln.EndPoint)
                acUCSTblRec.YAxis = acUCSTblRec.XAxis.GetPerpendicularVector

                '' Open the active viewport
                Dim acVportTblRec As ViewportTableRecord
                acVportTblRec = tr.GetObject(doc.Editor.ActiveViewportId, _
                                                  OpenMode.ForWrite)

                '' Display the UCS Icon at the origin of the current viewport
                acVportTblRec.IconAtOrigin = True
                acVportTblRec.IconEnabled = True

                '' Set the UCS current
                acVportTblRec.SetUcs(acUCSTblRec.ObjectId)
                doc.Editor.UpdateTiledViewportsFromDatabase()
                Dim view As ViewTableRecord = ed.GetCurrentView()
                ed.SetCurrentView(view)
                '' Display the name of the current UCS
                Dim acUCSTblRecActive As UcsTableRecord
                acUCSTblRecActive = tr.GetObject(acVportTblRec.UcsName, _
                                                      OpenMode.ForRead)

                Application.ShowAlertDialog("The current UCS is: " &amp;amp; _
                                            acUCSTblRecActive.Name)

                Dim pPtRes As PromptPointResult
                Dim pPtOpts As PromptPointOptions = New PromptPointOptions("")

                '' Prompt for a point
                pPtOpts.Message = vbLf &amp;amp; "Enter a point: "
                pPtRes = doc.Editor.GetPoint(pPtOpts)

                Dim pPt3dWCS As Point3d
                Dim pPt3dUCS As Point3d

                '' If a point was entered, then translate it to the current UCS
                If pPtRes.Status = PromptStatus.OK Then
                    pPt3dWCS = pPtRes.Value
                    pPt3dUCS = pPtRes.Value

                    '' Translate the point from the current UCS to the WCS
                    Dim newMatrix As Matrix3d = New Matrix3d()
                    newMatrix = Matrix3d.AlignCoordinateSystem(Point3d.Origin, _
                                                               Vector3d.XAxis, _
                                                               Vector3d.YAxis, _
                                                               Vector3d.ZAxis, _
                                                               acVportTblRec.Ucs.Origin, _
                                                               acVportTblRec.Ucs.Xaxis, _
                                                               acVportTblRec.Ucs.Yaxis, _
                                                               acVportTblRec.Ucs.Zaxis)

                    pPt3dWCS = pPt3dWCS.TransformBy(newMatrix)

                    Application.ShowAlertDialog("The WCS coordinates are: " &amp;amp; vbLf &amp;amp; _
                                                pPt3dWCS.ToString() &amp;amp; vbLf &amp;amp; _
                                                "The UCS coordinates are: " &amp;amp; vbLf &amp;amp; _
                                                pPt3dUCS.ToString())
                End If

                '' Save the new objects to the database
                tr.Commit()
            End Using
        End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Merry Christmas and Happy Holiday to all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000" face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Dec 2011 17:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3273997#M57913</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-12-24T17:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3280637#M57914</link>
      <description>&lt;P&gt;Hi folks! &amp;nbsp;Sorry it took so long for me to get back to you. &amp;nbsp;I was on vacation all of last week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kerry, when you have a moment, can you posibly give me some examples of how to use the .SetCurrentView method to set the current view to a plan view of the current UCS? &amp;nbsp;I read the thread you linked, but am still struggling with getting it to work and cannot find any other examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it is all in the Matrix3d transformation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:45:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3280637#M57914</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2012-01-04T15:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3282967#M57915</link>
      <description>&lt;P&gt;Just an update for those that may be following along...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this working by using a workaround (enabling the UCSFOLLOW system variable), but would eventually like to get it working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a side note... adding Editor.UpdateTiledViewportsFromDatabase() to update the new UCS names in the UCSII toolbar properly "breaks" the UCSFOLLOW functionality. &amp;nbsp;Unfortuantely, if&amp;nbsp;&lt;SPAN&gt;Editor.UpdateTiledViewportsFromDatabase() is not used, then the current UCS name is not shown in the UCSII toolbar dropdown. &amp;nbsp;Probably just doing something wrong.&amp;nbsp;&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2012 23:39:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3282967#M57915</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2012-01-05T23:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rotating UCS and Plan command</title>
      <link>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3323225#M57916</link>
      <description>&lt;P&gt;Did you try setting:&lt;/P&gt;&lt;PRE&gt;acVportTblRec.UcsFollowMode&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;True&lt;/SPAN&gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2012 16:17:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rotating-ucs-and-plan-command/m-p/3323225#M57916</guid>
      <dc:creator>bowdenj</dc:creator>
      <dc:date>2012-02-08T16:17:36Z</dc:date>
    </item>
  </channel>
</rss>

