Results 1 to 3 of 3

Thread: Should I Always Translate Coords?

  1. #1
    Oberer Guest

    Should I Always Translate Coords?

    I tend to use my ucs quite often and notice that many LDD routines and some that i've written need the coords to be in the world ucs.

    So how do you safely program for drafters like me? That is, do you check the ucs, or translate the coords?

    Would it be safe for me to always include a line similar to:
    PickPoint = ThisDrawing.Utility.TranslateCoordinates(PickPoint , acWorld, acUCS, False)

  2. #2
    James Belshan Guest
    Points returned by GetPoint, GetEntity, Object Properties, etc are always
    in WCS, regardless of what the UCS is set to. The following simple example
    will show different values if you move the UCS around. The user is entering
    (0,0,0) in the current UCS, and the varPt() holds the equivalent WCS coords.

    Code:
    Sub test()
       Dim varPt As Variant
       varPt = ThisDrawing.Utility.GetPoint(, "Type 0,0,0 -->")
       MsgBox varPt(0) & ", " & varPt(1) & ", " & varPt(2)
    End Sub
    One annoying thing that I find is that the current UCS does affect entities
    that you add. For example, a circle created by the AddCircle method will be
    parallel to the UCS X-Y plane. But the coordinates that you give for its
    center are in WCS. This is just an ACAD VBA quirk that you have to learn to
    work around.

    I didn't really answer your specific question, but I would say that you have
    to just know what coordinates are going to be input to your routine, your
    textboxes, etc, and do a translation if necessary.

    James


    "Oberer" <nospam@address.withheld> wrote in message
    news:1618085.1109950071587.JavaMail.jive@jiveforum 1.autodesk.com...
    I tend to use my ucs quite often and notice that many LDD routines and
    some that i've written need the coords to be in the world ucs.

    So how do you safely program for drafters like me? That is, do you check
    the ucs, or translate the coords?

    Would it be safe for me to always include a line similar to:
    PickPoint = ThisDrawing.Utility.TranslateCoordinates(PickPoint , acWorld,
    acUCS, False)

  3. #3
    Oberer Guest
    I'm going to bump this again to further the discussion. What i'm really asking is why don't we all check the ucs?
    There are MANY LDD routines that refuse to check.
    Even something basic like autocad's "find" (at least in 2k2) is thrown off by not being in the world ucs.

Similar Threads

  1. How to translate IGS to Solid?
    By Jary in forum Pro/Engineer
    Replies: 2
    Last Post: 09-10-2005, 09:10 AM
  2. About Translate Coordinate
    By anttam in forum VBA
    Replies: 5
    Last Post: 03-31-2005, 11:38 AM
  3. Replies: 9
    Last Post: 03-17-2005, 02:22 PM
  4. Translate a Lisp command in Vlisp
    By Marcel Goulet in forum Customization
    Replies: 1
    Last Post: 02-24-2005, 07:50 PM
  5. Replies: 12
    Last Post: 01-25-2005, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum