Recommended Posts

Posted (edited)

Wszystko o co mi chodzi wyjaśnione jest w załączniku w DWG. 

Próbowałem wystartować z lispa udostępnionego tutaj:

https://www.theswamp.org/index.php?topic=19881.30    (lisp Moveatt)

ale niestety rusza wszystko nie to co trzeba i nie wiem gdzie wskazać konkretny atrybut. CO pewnie też ważne to blok może mieć oczywiście różny obrót, ale podany wyzej lisp sobie z tym radzi.

Proszę o pomoc...

 

correct_opis.dwg

Edited by zwonko
Posted

w sumie to innym podejsciem ale ogarnąłem temat

(defun C:corblk (/
                  doc
                  x
                  ATT
                  dis
                  rot
                  )
  (vl-load-com)
  (princ "\nMove selected Attributes")
  (setq doc (vla-get-activedocument (vlax-get-acad-object)))
  (vla-startundomark doc)
  (cond
    ((ssget (list (cons 0 "INSERT")))
     (setq dis (getdist "\nType in scale: "))
     (setq dis (* 3.8 dis))
     (vlax-for item (vla-get-ActiveSelectionSet doc)
       (cond
         ((= (vla-get-HasAttributes item) :vlax-true)
          (setq att (variant-value (vla-getattributes item)))
          (foreach x (safearray-value att)
            (setq rot (vla-get-rotation x))
            (vla-put-insertionpoint x
                                    (vlax-3d-point
                                      (polar (safearray-value (variant-value (vla-get-insertionpoint x))) rot  dis ) )
               )
            )
          (vla-update item))
         ((princ "\nNo blocks in drawing"))))))
  (vla-endundomark doc)
  (princ)
  )

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...