Multiple visibilty parameters in a dynamic block

Multiple visibilty parameters in a dynamic block

mehdi-guida
Advocate Advocate
1,537 Views
21 Replies
Message 1 of 22

Multiple visibilty parameters in a dynamic block

mehdi-guida
Advocate
Advocate

Hi

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

Thank You

0 Likes
1,538 Views
21 Replies
Replies (21)
Message 2 of 22

Ed__Jobe
Mentor
Mentor

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

0 Likes
Message 3 of 22

mehdi-guida
Advocate
Advocate

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.  

0 Likes
Message 4 of 22

Ed__Jobe
Mentor
Mentor

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

0 Likes
Message 5 of 22

mehdi-guida
Advocate
Advocate

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.

0 Likes
Message 6 of 22

Ed__Jobe
Mentor
Mentor

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

0 Likes
Message 7 of 22

mehdi-guida
Advocate
Advocate

Thank you

But I need 3 individual visibility parameters.

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

0 Likes
Message 8 of 22

Ed__Jobe
Mentor
Mentor

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

0 Likes
Message 9 of 22

j.palmeL29YX
Mentor
Mentor

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
Mentor
Mentor

@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

0 Likes
Message 11 of 22

neil
Participant
Participant

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

0 Likes
Message 12 of 22

j.palmeL29YX
Mentor
Mentor

@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

0 Likes
Message 13 of 22

neil
Participant
Participant

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.

0 Likes
Message 14 of 22

h_s_walker
Mentor
Mentor

@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

0 Likes
Message 15 of 22

neil
Participant
Participant

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.

0 Likes
Message 16 of 22

h_s_walker
Mentor
Mentor

@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

0 Likes
Message 17 of 22

neil
Participant
Participant
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.
0 Likes
Message 18 of 22

neil
Participant
Participant

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

0 Likes
Message 19 of 22

neil
Participant
Participant

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

0 Likes
Message 20 of 22

vcocoraP86VJ
Participant
Participant

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!!!

0 Likes