Jump to content

How to manage array steps by lisp in dynamic blocks


MastroLube

Recommended Posts

Hi there,

I've a little question for you.

 

Do you know if it's possible to control the distance among elements in an array action ?

 

I'm able to change dynamic proprieties but not this one

Example: test.dwg

 

This is how I look at dynamic properties in develop mode:

_$ (setq ent (vlax-ename->vla-object (car (entsel))))
#<VLA-OBJECT IAcadBlockReference 0000000047467ed8>
_$ (SETQ props (VLAX-INVOKE ent 'getdynamicblockproperties))
(#<VLA-OBJECT IAcadDynamicBlockReferenceProperty 0000000046df3af8> #<VLA-OBJECT IAcadDynamicBlockReferenceProperty 0000000046df6c78>)

 

Thanks,

Dennis

Link to comment
Share on other sites

Try this routine Dennis and let me know .

 

(defun c:test (/ d i s)
;;; Tharwat 09.Apr.2015    ;;;
 (if (and (setq s (ssget "_:L" '((0 . "INSERT") (2 . "`*U*"))))
          (setq d (getdist "\n Specify Distance :"))
     )
   (repeat (setq i (sslength s))
     (foreach x (vlax-invoke
                  (vlax-ename->vla-object (ssname s (setq i (1- i))))
                  'getdynamicBlockproperties
                )
       (if (eq "Distanze1" (vla-get-propertyname x))
         (vlax-put x 'value d)
       )
     )
   )
 )
 (princ)
)
(vl-load-com)

Link to comment
Share on other sites

Hello Tharwat, thanks for your reply but it isn't what i'm looking for.

Sorry, my bad, I'm not so good in English.

I'll try to explain it better with some pictures :D

 

2015-04-10 09_43_28-Autodesk AutoCAD 2015 - [distinta cordoli.dwg].jpg

 

2015-04-10 09_38_34-Autodesk AutoCAD 2015 - [distinta cordoli.dwg].png

 

Hope now it's more clear :)

 

Dennis

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...