Align block with view/ucs

Discussion in 'AutoCAD' started by bob.at, Jun 13, 2004.

  1. bob.at

    bob.at Guest

    Chris,

    i yous the following in my 3d-tools. ename is the entityname of the block, element is the element list of this block. The blocks are rotated to the current ucs.
    You can use it, if it helps to your problem.

    (setq vektneu (trans '(0 0 1) 1 0 T))
    (setq pktneu (trans (setq pkt (cdr (assoc 10 element)))
    (cdr (assoc 210 element)) vektneu))
    (setq element (subst (cons 10 pktneu) (assoc 10 element) element))
    (setq element (subst (cons 210 vektneu) (assoc 210 element) element))
    (entmod element)
    (setq elements (entget (setq enames (entnext ename))))
    (while (not (= (cdr (assoc 0 elements)) "SEQEND"))
    (setq diff (mapcar '- (cdr (assoc 10 elements)) pkt))
    (setq pktneus (mapcar '+ pktneu diff))
    (setq elements (subst (cons 10 pktneus) (assoc 10 elements) elements))
    (setq elements (subst (cons 210 vektneu) (assoc 210 elements) elements))
    (entmod elements)
    (setq elements (entget (setq enames (entnext enames))))
    )
    (entupd ename)
     
    bob.at, Jun 13, 2004
    #1
  2. bob.at

    Chris Kelly Guest

    Bob,
    This is perfect. Thanks very much. You have saved my a lot of work. Nice
    and fast too!!
    Chris

    element is the element list of this block. The blocks are rotated to the
    current ucs.
     
    Chris Kelly, Jun 13, 2004
    #2
  3. bob.at

    Chris Kelly Guest

    Hi there,
    I am looking for suggestions for how I might approach the following
    problem. I am trying to align a block with the current view/UCS. Just so I
    can see the attributes while working in 3D. Does anyone know of a property
    that defines the UCS for a block. Does anyone know if a blocks UCS could be
    changed?

    Thanks in advance for any responses.
    Regards,
    Chris Kelly
     
    Chris Kelly, Jun 13, 2004
    #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.