Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello, I'm looking to get a rule

Status
Not open for further replies.

PrazSparty

Automotive
Feb 16, 2024
6
Hello,

I'm looking to get a rule to add two parameters together when an "if" command is used in a rule.

If the `Width Offset Needed` = "RH" or "LH" then I need the `Name/Stock Size` parameter to update to include the added length of the `Width Offset Length`.

In other words, if the offset is needed then the size should update to 32 because 22mm from the `Angle Length` plus the 10mm from the 'Width Offset Length`

I've tried multiple strings like below with no luck.

if `Width Offset Needed` =="RH"
{
`Angle Length` = ToString(`Angle Length` +`Width Offset Length`)
}


Capture_qxg2vz.jpg
 
Replies continue below

Recommended for you

your "Angle Length" is a length parameter, ToString as the name implies makes a STRING of a real value.
Try `Angle Length` = `Angle Length` +`Width Offset Length`

regards,
LWolf
 
Thanks LWolf, I did try that and i get a weird number like 0.0074
 
you could try something like this:

if ( Width Offset Needed` =="RH" or `Width Offset Needed` =="LH")

`Total Angle Length` = `Angle Length` +`Width Offset Length`

else

`Total Angle Length` = `Angle Length`

works for me

rule001_ei2hie.png


Eric N.
indocti discant et ament meminisse periti
 
Thanks for the feedback, i will give it a try.

Would you happen to know how to hide/deactivate 3D text using a rule? I have tried both ways as shown below with no luck.


if `Pin Style` == "Round Slot"
{
`Annotation Set.1\Hole Size\Activity` = false
}

if `Pin Style` == "Round"

{
`Annotation Set.1\Slot Size` .Show = false
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor