# Thread: Create and Use UCS Nightmare

1. Login to Give a bone

## Create and Use UCS Nightmare

Help, I'm so used to Inventor that I can't remember how to code VBA for AutoCAD 2000 anymore ...

I'm converting Lisp to VBA ... here's problem #1

Lisp and this kludge places the UCS Correctly:
lisp: (command "ucs" "3" t1 t2 t3)

kludge:
Code:
```oAcadDoc.SendCommand ("ucs" & vbCr & "3" & vbCr & _
Points("t1")(0) & "," & Points("t1")(1) & "," & Points("t1")(2) & vbCr & _
Points("t2")(0) & "," & Points("t2")(1) & "," & Points("t2")(2) & vbCr & _
Points("t3")(0) & "," & Points("t3")(1) & "," & Points("t3")(2) & vbCr)```
this object translation says that the X & Y are not perpendicular:
Code:
```oAcadDoc.UserCoordinateSystems.Add Points("t1"), Points("t2"), Points("t3"), "TrussUCS"

t1 = -96.4785029029331,146.5,-33.2182276140068
t2 = 126.478502902933,146.5,-33.2182276140067
t3 = 15,146.5,-2.012174663178```
Problem #2: how best to work in the
UCS while in VBA, for instance, I use modelspace.add solid with World points and the solid appears correctly in the UCS. I use block.addsolid with World Points and the solid appears upside down in the UCS when the block is inserted in the UCS. If inserted in world, the blocks are flat lines, no Z.

2. Login to Give a bone

## Re: Create and Use UCS Nightmare

Well found an answer to Question #1 here: http://forums.augi.com/showthread.php?p=33164#poststop and the code worked beautifully.

Still needing help determining how best to translate the LISP to VBA and work within the UCSs and with Blocks.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•