I am trying do get started using
Dim db As DatabaseServices.Database = acadApp.DocumentManager.MdiActiveDocument.Database
Dim trans As DatabaseServices.Transaction = db.TransactionManager.StartTransaction
Dim docLock As DocumentLock = acadApp.DocumentManager.MdiActiveDocument.LockDocument(DocumentLockMode.Write, "CrosshairAlignmentMagLevel", "CrosshairAlignmentMagLevel", True)
Dim ucsTbl As UcsTable = DirectCast(trans.GetObject(db.UcsTableId, DatabaseServices.OpenMode.ForWrite, False), UcsTable)
Dim ucsRec As UcsTableRecord = DirectCast(trans.GetObject(ucsTbl(UcsTableRecord.ModelSpace), DatabaseServices.OpenMode.ForWrite, False), UcsTableRecord)
ucsRec.Origin = New Point3d(19, 109, -55)
ucsRec.XAxis = New Vector3d(1, 0, 0)
ucsRec.YAxis = New Vector3d(0, 1, 0)
I seem to be having trouble accesing the UCSRableRecord so I can move and twist the UCS and update the database.
Should I be looking to do a dllimport on AcDbUCSTableRecord. There is no mention of adjusting a UCS in .net but it's done in the ARX group.
Thanks for any input in advance
Max