Linear parameter - variable maximum

Linear parameter - variable maximum

Andrzej_K.
Contributor Contributor
2,983 Views
9 Replies
Message 1 of 10

Linear parameter - variable maximum

Andrzej_K.
Contributor
Contributor

I am trying to prepare dynamic block and I have an issue with linear paramteres.

I have two linear parameters.

 

Linear parameter L1 with minimum value 0 and max 100.

Linear parameter L2 with minimum value 0 and max 100.

 

What I want to do is to have parameter L2 maximum value be equal to current value of L1.

So if:

L1_current=50 -> L2max=50.

 

If I streach L1 and:

L1_current=70 ->L2max=70.

 

Is this possible? Can I for example set variable V1=L1_current and L2max=V1?

If so, can you explain to me how to do that? I am new to dynamic blocs and variables in AutoCAD so you can safely assume I know little (blocks) or even nothing (variables) about those topics.

Because the L1 is incremental(responsible for visibility states) in my case, I think, I could tie the L2 with visibility and have one L2 parameter for each visibility state (L2.1, L2.2, L2.3 etc.) instead. This would mean I would have L1 and number of L2.x parameters. However, I would like to know if cleaner/striaghtforward connection betweenn L1 and L2 is possible.

0 Likes
Accepted solutions (1)
2,984 Views
9 Replies
Replies (9)
Message 2 of 10

h_s_walker
Mentor
Mentor

The attached drawing shows you two ways of doing it.

The square on the left uses a linear parameter with two stretches attached to it. The stretch1 action has an angle offset of 90 degrees.

 

The square on the right uses a scale action attached to a linear parameter.

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 3 of 10

h_s_walker
Mentor
Mentor

Ignore my previous post. I've just reread your post. It may be possible using parametric constraints, but I only have LT so am not able to help in that direction

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 4 of 10

j.palmeL29YX
Mentor
Mentor

Using Dynamic Parameters and Actions I don't know how that could be done.

 

But using Parametric Constraints - attached a first attempt.

The length of the left line can be changed to any value up to 100. The length of the right line can never exceed the length of the left line, but of course can be smaller.

 

 

>>Demo<<

 

 

 

 

 

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 5 of 10

h_s_walker
Mentor
Mentor

That looks like what he needs, however the problem I see is that the distance 2 grip can move far beyond the extent of the line.

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 6 of 10

j.palmeL29YX
Mentor
Mentor

I am aware of this inadequacy. Therefore @Andrzej_K.  should test if this is a problem for HIM too, or just an acceptable unpleasantness.

 

 

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 7 of 10

Andrzej_K.
Contributor
Contributor

I have look at your solution and it seems to be more less what I want. 

Could you please explain how to achieve that? 

I have opened your file and I see left line with Vertical constraint and right one as well. However, when I select right one there is Rotated Dimension (Dynamic). I do not know how to get all that. What to select etc.

If it helps you I have attached sample of my block below. 

I have left slider - adding position the the list. This is my L1.

And right slider - filling the list with default text. That is my L2. 

I really would like to ask for guide how to add this myself. 

0 Likes
Message 8 of 10

h_s_walker
Mentor
Mentor

When you are in the block editor choose the PARAMETRIC tab and then click SHOW ALL (see the image below)

You will see a parameter in which the minimum distance of the line is fixed at whatever the dimension D2 is currently and the maximum is set at whatever D1 is currently

 

Capture.JPG

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 9 of 10

j.palmeL29YX
Mentor
Mentor
Accepted solution

@Andrzej_K. wrote:

 

Could you please explain how to achieve that? 

 


 

A short explanation:

d1 (for the left line) is the independent parameter (only limited to max 100).
d2 is a dummy parameter, the user can set any value.
d3 is the parameter which is used for the right line. But it's value is a formula min(d1;d2). That means, even if the user set d2 to a higher value than d1, d3 (which controls the length of the right line) will use the smaller value -> the length of the right line can not be greater than the left line.

I'm not sure if you can transform this princip to your model. Formulas are only possible in Parametric Dimensions. But you have (and need?) a lot of Dynamic Parameters and Actions too. And it's not recommended to mix Dynamic Parameters and Actions with Parametric Constraints and Dimensions. You often will get "unexpected results".

 

I'm afraid for your model it is not usable ... But you only know after you have tried it.

 

 

[EDIT at 11:10]

 

Attached an image of the block editor for more clarifying.

The grip of the parameter d2 was moved to the end of the richt line (for better handling).

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 10

Andrzej_K.
Contributor
Contributor

Thank you for explanation. I doubt that I can find anything better given the limitations I have in the block. 🙂

0 Likes