vla-insertblock rotation issue

Discussion in 'AutoCAD' started by Robert Good, Sep 16, 2003.

  1. Robert Good

    Robert Good Guest

    I am writing a function to insert blocks with the vla method:

    (vla-insertBlock mspace <insertion point> <xscale> <yscale> <zscale>
    <rotation>)

    the problem is with the rotation entry. I seems thru my experimentation that
    the rotation has nothing
    to do with the current ucs and everything to do with the system variable
    "ViewTwist"

    current ucs rotated 45 degrees from wcs - "ViewTwist" = 315 <radian
    equivelent>
    current ucs rotated 90 degrees from wcs - "ViewTwist" = 270 <radian
    equivelent>
    current ucs rotated 135 degrees from wcs - "ViewTwist" = 225 <radian
    equivelent>

    ...... Just figured out something. the view angle on viewtwist goes
    clockwise.

    But, how do I invert this number to a usable rotation in the
    vla-insertBlock....

    Am i heading in the correct direction, or am i just flailing in the deep
    end???

    Robert Good.
     
    Robert Good, Sep 16, 2003
    #1
  2. Robert,

    The angle is in WCS. ViewTwist has nothing to do with it (other than
    affecting what you see on the screen).


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | I am writing a function to insert blocks with the vla method:
    |
    | (vla-insertBlock mspace <insertion point> <xscale> <yscale> <zscale>
    | <rotation>)
    |
    | the problem is with the rotation entry. I seems thru my experimentation
    that
    | the rotation has nothing
    | to do with the current ucs and everything to do with the system variable
    | "ViewTwist"
    |
    | current ucs rotated 45 degrees from wcs - "ViewTwist" = 315 <radian
    | equivelent>
    | current ucs rotated 90 degrees from wcs - "ViewTwist" = 270 <radian
    | equivelent>
    | current ucs rotated 135 degrees from wcs - "ViewTwist" = 225 <radian
    | equivelent>
    |
    | ..... Just figured out something. the view angle on viewtwist goes
    | clockwise.
    |
    | But, how do I invert this number to a usable rotation in the
    | vla-insertBlock....
    |
    | Am i heading in the correct direction, or am i just flailing in the deep
    | end???
    |
    | Robert Good.
    |
    |
     
    R. Robert Bell, Sep 16, 2003
    #2
  3. Robert Good

    Robert Good Guest

    Thanks Robert.
    I will look into getting the x axis of the current ucs and converting that
    to an angle relative to the wcs.

    Thanks again,
    Robert Good.
     
    Robert Good, Sep 17, 2003
    #3
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.