Model to world Transformation 4 x 4

Discussion in 'AutoCAD' started by kdf329, Jul 15, 2003.

  1. kdf329

    kdf329 Guest

    In lisp you could get the 4 x 4 model to world tranformation matrix for blocks using the "NENTSELP" command inside of lisp. How or can you get that same 4 x 4 matrix using VBA.
     
    kdf329, Jul 15, 2003
    #1
  2. Since it's been a few days and no one has an answer for you, I just wanted
    to follow up, since the geometry questions are the more interesting ones.
    Are you intent on getting that matrix, or is your true goal to transform
    something to/from the block's coordinate system, and this is just one way
    that you're researching.


    I'm sure you've seen that blockreferences have the following properties
    which should fully define the transformation matrix. If you're trying to
    transform coordinates from WCS into block OCS, though, it may be easier
    (even if not as fun) to apply these as individual transforms than to come up
    with the matrix.
    InsertionPoint, Normal, Rotation,
    XScaleFactor, YScaleFactor, ZScaleFactor

    This thread may be helpful; Mr. Fleming seems to have this coded in LISP
    already.
    http://groups.google.com/groups?threadm=485DA4F61E38C602A006984F8E39FA80@in.
    WebX.maYIadrTaRb

    As usual, I like to jot down my Google searches to cut re-work:
    http://groups.google.com/groups?q=create+transformation+matrix+autocad

    HTH,

    James
     
    James Belshan, Jul 16, 2003
    #2
  3. oops... I meant to draft the previous msg and not send it for a couple of
    days, in case someone had a more helpful answer....

    Another thought... How about using USER variables to save the matrix on the
    LISP side (by sending LISP commands from VBA) and reading them on the VBA
    side. It'd take four rounds, one for each row of the matrix, but it seems
    straightforward. You can use "(handent)" and Object.Handle to tell LISP
    which object you want to select.

    James
     
    James Belshan, Jul 16, 2003
    #3
  4. Look at the GetSubEntity method of the Utilities object.


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


    | In lisp you could get the 4 x 4 model to world tranformation matrix for
    blocks using the "NENTSELP" command inside of lisp. How or can you get that
    same 4 x 4 matrix using VBA.
     
    R. Robert Bell, Jul 16, 2003
    #4
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.