Results 1 to 2 of 2

Thread: Create and Use UCS Nightmare

  1. #1
    Login to Give a bone
    0

    Question 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.


    Any suggestions would be helpful!
    Last edited by Opie; 2010-08-31 at 06:40 PM. Reason: [code] tags added

  2. #2
    Login to Give a bone
    0

    Default 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.

Similar Threads

  1. Help - STC Nightmare
    By cporter.207875 in forum Revit MEP - General
    Replies: 4
    Last Post: 2009-02-25, 11:37 PM
  2. Section Cut Nightmare
    By drafting1 in forum AMEP General
    Replies: 3
    Last Post: 2008-04-30, 07:56 PM
  3. Radiate nightmare
    By The Great GB in forum Revit - Rendering
    Replies: 3
    Last Post: 2007-12-13, 06:31 PM
  4. Xref Nightmare
    By philmsr in forum ACA General
    Replies: 5
    Last Post: 2007-11-14, 04:07 AM
  5. Nightmare Balusters
    By Eric Stewart in forum Revit Architecture - General
    Replies: 9
    Last Post: 2003-05-19, 10:35 AM

Posting Permissions

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