Testing for crosshair UCS angle

Discussion in 'AutoCAD' started by Cliff Davis, Nov 2, 2004.

  1. Cliff Davis

    Cliff Davis Guest

    I am trying to test for whether the crosshair angle is straight, excluding
    any snapang adjustment necessary. I am using the following code for a crude
    test:

    (and (not (equal (getvar "ucsxdir")'(1.0 0.0 0.0)))
    (equal (getvar "viewtwist") 0.0)
    )

    This code will fail to detect a rotated crosshair in certain situations such
    as below:
    UCSXDIR 0.1736,0.9848,0.0000 (read only)
    UCSYDIR -0.9848,0.1736,0.0000 (read only)
    VIEWTWIST = 300 (read only)

    Is there a known method of testing for the crosshair angle compared to the
    UCS?
    Thank you,
    Cliff Davis
     
    Cliff Davis, Nov 2, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.