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.

ProE IF statements w/string params

orrbit69

New member
I have a feature that changes location on different instances and I would like to base the dimension by a portion of what is in the description parameter. It needs to have 2 if statements for left hand or right hand conditions.


Here is what I would like to do:


IF DESCP == "*LH*"
Z = (W/2) - (.744/2) - .015
IF DESCP == "*RH*"
Z = (W/2) + (.744/2) - .015
ELSE
Z = W/2
ENDIF
ENDIF


Does anyone know how to compare a portion of a string parameter?


TIA.


KEN
 
if search(DESCP , "LH") >0
Z = (W/2) - (.744/2) - .015
if search(DESCP , "RH") >0
Z = (W/2) + (.744/2) - .015
ELSE

Z = W/2

ENDIF

ENDIF
 

Sponsor

Articles From 3DCAD World

Back
Top