cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Pro/Program questions

kmitchell
3-Visitor

Pro/Program questions

I have two questions regarding ProProgram.

1) Is there a way to look at information in a string parameter outputvalue to create a conditional relation? I’ve tried to use “extract”, but either haven’t figured out the correct syntax or have misunderstood how to use it.

My string parameter name is PPF. The PPF value can be A1A, B1A, C1A, etc. I want to create a condition in my program that looks only at position 2 & 3 (“1A”) of the PPF string parameter value.

I tried the following relation:PPF_E = EXTRACT(PPF,2,3)

The relations successfully verify, but I get the following warning:Probable error in function evaluation.

2) Is there a line limitation in a drawing program?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2

To you first point, I don't think Pro/E relations can use conditionals.
I typically use nested or chained if statements instead. In your
relation try "2" instead of "3" for the third argument - this is the
number of characters you want to extract from your original string. You
may be getting an error because you are trying to extract 3 characters
when starting from position 2, where there are only 2 characters
available.

To your second point, I've run into a limit on the number of characters
allowed on a single line. Off hand I don't know what number of
characters that is, and if I remember correctly, the drawing program
just truncates the line and you can't continue on the next line with "\"
like you can in Pro/Program. It's a shame that the functionality
available in Pro/Program is not the same in Drawing Program. In my
experience, you just have to get creative writing relations to get the
job done.

Regards,
Tyler
WF2
GavinBRumble
5-Regular Member
(To:kmitchell)

I'm wondering if Krystal doesn't have two different questions.one for
Pro/Program (which is really just Relations unless you are talking about the
"Adds") and one for Drawing Program (which is a different animal
altogether).



For Pro/Program, and hence for Relations, any statement beginning with IF is
a conditional. It looks like this:

IF (this is true)

blah blah blah

ENDIF

It can also look like this:

IF (this is true)

blah blah blah

ELSE

dah dah dah

ENDIF



Tyler is correct about your EXTRACT statement.use the 2 instead of 3.



Relations used to be limited to 80 characters which could be "continued" as
Tyler mentioned, but that limitation no longer applies.the new relations
editor handles long lines fine (as of WF1 I think). Since Drawing Table
Relations use the same editor, I assume line length does not apply there
either. Don't know about Drawing Program.



Thanks in advance,



Gavin B. Rumble, PE

Solid Engineering

336-224-2312


Top Tags