Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple visibilty parameters in a dynamic block

21 REPLIES 21
Reply
Message 1 of 22
mehdi-guida
841 Views, 21 Replies

Multiple visibilty parameters in a dynamic block

Hi

Is there any way to use multiple visibilty parameters in a dynamic block (by Lisp routine OR ...)?

Thank You

21 REPLIES 21
Message 2 of 22
ed57gmc
in reply to: mehdi-guida

It's not very clear what you're asking for. Do you already have parameters in your block and you want to access them in code or are you asking how to create them? It helps if you attach your block to your post.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 22
mehdi-guida
in reply to: ed57gmc

Thank you for respond.

When I want edit or design my dynamic block i am allowed to use visibility parameter only one time.

I will received error message "Visibility parameter already exists in block definition" if I want to use visibility parameter for second time. But I've heard  some Lisp routine can solve it.  

Message 4 of 22
ed57gmc
in reply to: mehdi-guida

Again, post your block and tell us how you want the block to work. What you want to be visible and what you don't want visible.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 5 of 22
mehdi-guida
in reply to: ed57gmc

Thank you.

Attached is a drawing include a simple dynamic block. I created a visibility parameter for small and big lines.

I want to create same visibility parameter for small and big circle and square.

Message 6 of 22
ed57gmc
in reply to: mehdi-guida

All you have to do is make a visibility stat active, then make the objects you don't want to show, invisible. Use the button in the Visibility panel or run the BVHIDE command.

 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 7 of 22
mehdi-guida
in reply to: ed57gmc

Thank you

But I need 3 individual visibility parameters.

One for lines, one for circles and one for squares. and each one work individually.

Message 8 of 22
ed57gmc
in reply to: mehdi-guida

You can only have one visibility parameter, but you can have many visibility states, e.g.

big line, big circle, big square

big line, sm circle, big square

big line, big circle, sm square

3 cubed number of states

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 9 of 22
j.palmeL29YX
in reply to: mehdi-guida

You can do that with a Double Lookup. 

 

An example is attached. Let us know if you need more help. (just in moment I'm in hurry)

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 10 of 22
j.palmeL29YX
in reply to: mehdi-guida


@mehdi-guida wrote:

I need 3 individual visibility parameters.

One for lines, one for circles and one for squares. and each one work individually.


 

Here a more detailed suggestion. 

 

 

 

How to create a Double LookUp parameter you find in the (still) pinned post above >>click<<

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 11 of 22
neil
in reply to: mehdi-guida

Solution above is a nice way switching on and off multiple combinations of more than 2 visibility states, however it takes a lot of time to get there. Is there no workaround to having more than one visibilty parameter, it would be so useful. I have a component drawn as a dynamic block, the component has various hatched finishes, and also has 3 optional lighting details. In an ideal world I would have one visibilty parameter for the finishes, and one for the lighting options, and they would work independently of one another in the same dynamic block.

Thanks

Message 12 of 22
j.palmeL29YX
in reply to: neil


@neil wrote:

 Is there no workaround to having more than one visibilty parameter,


 

No, only one visibiity parameter is allowed (read also message #8).

And the "workaround" to get the whished behavior was described above (double lookup). 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 13 of 22
neil
in reply to: mehdi-guida

Ok thanks. I'll look for another solution. Double lookup is Ok for 3 variables, but I have 8-10 variables per component, and 30 components to author. The length of time that would take is too much for this job I think.

Message 14 of 22
h_s_walker
in reply to: mehdi-guida

@neil Have you tried a block properties table?

You can fill in the combinations in excel and then copy and paste into the table

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 15 of 22
neil
in reply to: h_s_walker

Thanks
I think that if I were combining linear or polar parameters that would work, since I can have multiple parameters in the table and asign different combinations of values, but because there is only one visibilty parameter, I cant see a way to combine different visibility states. I guess its an understandable limitation, if there was more than 1 visibility parameter, and there was overlap between the objects selected in combined visibility states it would result in error. It would however work very nicely if there wasn't overlap.
To better explain uploaded one of the blocks with fewer variables. 3 materials & 4 lighting options resulting in 12 visibility states. Ideally I would have 3 visibility states for the materials and 4 for the lighting features with another parameter

A complication is that this is a 3d model with 2d dynamic properties, but I dont think that affects the problem.

Message 16 of 22
h_s_walker
in reply to: mehdi-guida

@neil I would read the pinned topic How to Make a Double Lookup - Autodesk Community - AutoCAD. That would do exactly what you want. It takes a little more work to do, but I've reattached your drawing

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 17 of 22
neil
in reply to: h_s_walker

Thanks for the help, yes also saw old YouTube vid on 4 way visibility basically doing the same thing from KaDe King (https://www.youtube.com/watch?v=cYZGh70ttF8) which is longer but explains it nicely. Lot of work but looks to be the best solution cheers.
Message 18 of 22
neil
in reply to: neil

FYI there is a fast and dirty solution xclipping the block, then using flip to hide the contents outside the xclip. Doesn't behave that well though, the flip states need to be changed before the other actions or it seems to break. XCLIPFRAME set to 0 for this to work. attched. Will use the double Lookup method thanks for help

Message 19 of 22
neil
in reply to: neil

error in that last block posted, attached correct works well with xclip

Message 20 of 22
vcocoraP86VJ
in reply to: j.palmeL29YX

I see what you did there, you flip the desired geometry then turn it invisible. Can be used for any number of objects within the block.

Nice!!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report