Skip to main content
1-Visitor
April 24, 2020
Question

Help: how do i get Creo to allow negative values

  • April 24, 2020
  • 2 replies
  • 3640 views

Am I not understnding the syntax for allowing negative values?

I get the following error

 

d22=asin(1.4607*sin(d21))
errorInvalid attempt to assign negative value -0.875425deg to 'D22'. Precede the symbol with '$' to allow negative value.

 

but after adding $, I get the following error

$d22=asin(1.4607*sin(d21))
errorInvalid left side of assignment

2 replies

23-Emerald IV
April 24, 2020

Your syntax is correct.  The dollar sign does get placed in front of the dimension name.  More than likely the value is not be valid, regardless of the fact that it is negative.  What happens if you remove the relation and manually try setting D22 to -0.875425 deg.  Does it fail?

dramirez1-VisitorAuthor
1-Visitor
April 24, 2020

$d22=-.875

Still give the l'invalid left sided of assignment' error

 

d22 is the angle between a sketch curve and the datum.

Doess Creo therefore only allow values between 0 and 360?

 

I may have to figure out an if statement to convert the angle to a positive value between 0 and 360 

18-Opal
April 24, 2020

I think you just put in the negative value... and let the dimension respond to it.

24-Ruby III
April 27, 2020

@dramirez wrote:

Am I not understnding the syntax for allowing negative values?

I get the following error

 

d22=asin(1.4607*sin(d21))
errorInvalid attempt to assign negative value -0.875425deg to 'D22'. Precede the symbol with '$' to allow negative value.

 

but after adding $, I get the following error

$d22=asin(1.4607*sin(d21))
errorInvalid left side of assignment


Hi,

 

1.] http://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/part_modeling/part_modeling/part_five_sub/About_Editing_Dimensions.html 

set show_dim_sign yes

 

2.] http://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/fundamentals/fundamentals/fund_seven_sub/Negative_Dimensions_in_Relations.html 

use notation $dimensionname in relations