Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

String Relation help?

ahldesign

New member
Hi Guys,


I am trying to write a relation to determine whether a part number starts with either ABC or DE1?


I have tried looking and trying to resovle it, but i am struggling? The relation so far looks likes the below, but it doesnt work?


/* DECIDING IF DRAWING ISABC OR DE5


DECIDE_1 = 'ABC'
DECIDE = EXTRACT(PART_NO,1,3)


DECIDE = DECIDE_1 == 'ABC'
ENDIF YES (its coming back with yes as an answer rather than 'true'


If the part number starts with 'ABC' i have a relation which converts underscores to dashes this works, if the part number starts with DE5 then it is left as it is?


Your help is much appreciated?





Regards


Gary
 
DECIDE_1 = 'ABC'
DECIDE = EXTRACT(PART_NO,1,3)


IFDECIDE == 'ABC'
DECIDE = "TRUE"
ENDIF


There is an option in the drawing setup file to display the yes/no parameter as true/false, but Pro/E defines it as a yes/no parameter


yes_no_parameter_display ftue_false
 

Sponsor

Articles From 3DCAD World

Back
Top