Parameters Manager

Parameters Manager

dbrblg
Collaborator Collaborator
626 Views
6 Replies
Message 1 of 7

Parameters Manager

dbrblg
Collaborator
Collaborator

What I thought was a simple task, which was to try and control the angle of a line in a dynamic block via an attribute, I have come up with a couple of odd things.

 

Parametric.jpg

 

The first thing is that if I overwrite the expression for Angle1 by typing 90, I get what is shown in the image; the angle is clearly not 90 and the expression is also not 90.  All values do this, not just 90.  This is the first odd thing.

 

The second is the expression for ATT;  I would have expected a calculated value of 116.620156177 multiplied by 2 (233.240312354) not the value taken literally.

 

All I want is to control the angle via a calculation based on the value of the attribute but cannot help feeling I've missed something which I cannot put my finger on.

 

Can anyone assist?

 

Many thanks

 

 

0 Likes
627 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

The value that is introduced there is in radians, so 90 is actually 90radians, witch is (90*180)/pi=50893,8º... (pi radians = 180º)

 

If instead of 90 you insert PI (right click > Expressions > PI), the result is 180º.

 

Hope that answers your two troubles x)

0 Likes
Message 3 of 7

Libbya
Mentor
Mentor

@dbrblg wrote:

All I want is to control the angle via a calculation based on the value of the attribute

 

 


I think you will not find that to be possible.  You can control the value of the attribute based on the angle using a BlockPlaceholder field, but I don't think you will be able to affect the angle by changing the attribute value.  Regardless, it seems to me just as easy to change the parameter and have the attribute update as it would be to change the attribute and have the parameter update.  

0 Likes
Message 4 of 7

dbrblg
Collaborator
Collaborator

Hi dchpires,

 

uurrggghhh radians Smiley Surprised I didn't see that one coming!!  That's solved that one.....

 

Unfortunately I cannot add an expression that includes the attribute text.  I do wonder whether it is because the variable is a 'variable' type so could contain text which is not ideal for a angle calculation!!

 

Coincidentally if I add a user parameter, I can use it in the angle expression but this is not the way I want to go....

 

Thanks

0 Likes
Message 5 of 7

Libbya
Mentor
Mentor

Coincidentally if I add a user parameter, I can use it in the angle expression but this is not the way I want to go....


[Rolling Stones playing in the background]... "but if you try sometimes"...[/Rolling Stones]

0 Likes
Message 6 of 7

dbrblg
Collaborator
Collaborator

 


Libbya wrote

I think you will not find that to be possible.  You can control the value of the attribute based on the angle using a BlockPlaceholder field, but I don't think you will be able to affect the angle by changing the attribute value.  Regardless, it seems to me just as easy to change the parameter and have the attribute update as it would be to change the attribute and have the parameter update.  


so if I understand correctly, its a one way thing - the angle can update an attribute but the attribute cannot update the angle....seems pretty poor.  All I want to do is type in a value which calculates the angle of the line. 

 

I wanted an attribute as everything is in one place and you dont have to go into the properties to update something else which is what you'll do if I use a user parameter.

 

 

0 Likes
Message 7 of 7

Libbya
Mentor
Mentor

@dbrblg wrote:

 

 

so if I understand correctly, its a one way thing - the angle can update an attribute but the attribute cannot update the angle....seems pretty poor.  All I want to do is type in a value which calculates the angle of the line. 

 


...and AutoCAD has granted that wish.  Just type in the value into the parameter.  Pardon my saying so, but the thing that 'seems pretty poor' is your attitude toward it.

 


Correct, it's a one way thing.  I don't understand your gripe, though.  Set up your attribute value with a field or fields and then your only thing to adjust is the parameter.  It's the same amount of input either way.  

0 Likes