Have you looked into the Allowed Values of the DynamicBlockProperties Object for the available Visibility State(s)?


Registered forum members do not see this ad.
Hi, Im Looking to change a lookup and a visibily state in a dynamic block with a lisp routine
This routine will change a certain number of tower and a hook radius.
So I need to give a radius and a height(number of tower)
To give a bigger picture it is a program for tower cranes.
Thank for all the help in advance.
If you need more information don't hesitate to ask
Cheers & Beers
Have you looked into the Allowed Values of the DynamicBlockProperties Object for the available Visibility State(s)?
"Potential has a shelf life." - Margaret Atwood


Well I have found a way to get the Visibility State.. but the lookup i can't find it.
Is there a way to select block already in the drawing them put them in entlast without selecting objets.
Test.dwgCode:(setq Boom (entlast)) (setq Boom (vlax-ename->vla-objet Boom)) (vlax-dump-object Boom) (setq dbp (vla-getdynamicblockproperties Boom)) (setq dbp (vlax-variant-value dbp)) (setq dbp (vlax-safearray->list dbp)) (setq bp (car dbp)) (vlax-dump-object bp) (setq ListeAdmis (vlax-safearray->list (vlax-variant-value (vla-get-AllowedValues bp)))) (setq ListeAdmis (mapcar 'vlax-variant-value ListeAdmis)) (vla-put-value bp B-Radius)


Hi I don,t want to pressure anyone but is it possible to be pointed in the right direction so i can continu my routine. Thank


test2.dwgOk So ill give more information here!
Ill give another autocad drawing with it.
I need to be able to change all those 3 dynamic block with their visibility states.
If you select all 3 in the drawing you can change the value of then in properties/ custom/visibility1
in this code here :i can change the value of the visibility but i can seem get it to select the blocks i want.Code:(setq fleche '("LC CHARGE 290" "LC B-T 290" "LC C-P 290")) (initget 1 "74m 70m 64m 60m 54m 50m 44m 40m") (setq b-radius(getkword "\n Donner le rayon de la flèche : ")) (vl-load-com) (setq adoc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for fleche(vla-get-blocks adoc)) ;(initget 1 "170 210 290 550") ;(setq tower-serie(getkword "\nDonner le modele de la grue : ")) (setq fleche (entlast)) (setq fleche (vlax-ename->vla-object fleche)) (vlax-dump-object fleche) (setq dbp (vla-getdynamicblockproperties fleche)) (setq dbp (vlax-variant-value dbp)) (setq dbp (vlax-safearray->list dbp)) (setq bp (car dbp)) (vlax-dump-object bp) (setq ListeAdmis (vlax-safearray->list (vlax-variant-value (vla-get-AllowedValues bp)))) (setq ListeAdmis (mapcar 'vlax-variant-value ListeAdmis)) (vla-put-value bp B-Radius)
Last edited by CadFrank; 13th Apr 2012 at 06:27 pm.


Hi, i really need some help here ive been working on this since 3 days can't seem to get anywhere please help me out i'm about to lose my head!


why am i not getting any answers to my post??
Which post are you referring to?
Could be no one has an answer. Or it could be the question is not understood but no one has bothered to either say so or to ask for follow-up information.
Could be things are a bit slow; everyone is kind of busy perhaps.
We are, after all, only volunteers and not paid staff.
I'm sure it is not intentional. These things do happen though.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!


Its the third Post
I'm sorry i must sound kinda mad.. lol I just been trying to solve this routine for so long ... Don't know where to go anymore.
Registered forum members do not see this ad.
Is this the one you are referring to?
Hi, Im Looking to change a lookup and a visibily state in a dynamic block with a lisp routine.
The low number of responses may have something to do with the fact that 1) it involves a dynamic block and 2) the fact you are looking for help with a lisp routine. That reduces the number of people who will look at the question and attempt to help as they have to be knowledgeable in both areas.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Bookmarks