• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

create a distinct dynamic blocks

  • Thread starter Thread starter tecnodoff
  • Start date Start date

tecnodoff

Guest
Hello everyone!! !
I explain my situation. ...
I created various dynamic blocks of basic elements x my work and wanted to know if there exists qlke way x can have a distinct ke indicate:

1 number of blocks inserted
2 the respective dimensions of each individual element

example:

travi "a": 5

beam "a1" length: x
beam "a2" length: xy

tegolo "z": 3

length "z1": x

And so on...

more if there is a possibility of converting everything into .xls format

thank you all in advance!
 
I think it's there.
In fact, I am developing, for completely different purposes, a lisp command that questions dynamic blocks to extract the relative parameters values.
in practice, first you have to extract all the blocks of the design (or only those inserted on certain layers) with the function (sssget) and then you question them with the function (getdbprops ), which is located in the site of cad3d (I no longer remember where!!!) along with other functions for me very interesting and that below I transcribe:
(defun getdbprops (objent / x y)
(if (= 'ename (type objent))
(setq objent (vlax-ename->vla-object objent)
(vl-remove-if
(lambda (y) (car y) "origin")
(mapcar)
(lambda (x)
(cons)
(vlax-get-property x "propertyname")
(if (= "visibility" (vlax-get-property x "propertyname"));_ if you want, in addition to the current value, also the list with all possible values, enter the real name of the parameter
(cons)
(vlax-variant-value (vlax-get-property x "value")
(list (mapcar (function) (vlax-variant-value y)))
(vlax-safearray->list)
(vlax-variant-value (vlax-get-property x "allowedvalues"))))
(vlax-variant-value (vlax-get-property x "value"))))
(vlax-safearray->list (vlax-variant-value (vla-getdynamicblockproperties objent))))))
the values extracted from this function will then be written in a text file, in a series of lines of the type:
nameblock-value of the parameter that interests.
such file can be read easily with excel.
Of course, writing completely the corresponding lisp command will lead to time and work, but I think the result can satisfy you widely.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top