Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page.
X
SUMMARY - carriage returns in strings for relations?
After some messing around, I discovered that this is easier than I thought.
I created string parameters
Option1
Option2
Option3
My relations now look like this:
Option1 = "
Option2 = "
Option3 = "
if var1==1
option1 = "option 1 text"
end if
if var2==2
option2 = "option 2 text"
end if
if var3==2
option3 = "option 3 text"
end if
Then the note in the drawing looks like this:
SELECTED OPTIONS
&option1
&option2
&option3
The beautiful thing about it is that if one of the if statements is not true, that line doesn't show up at all, which is what I want.
To carry on the example, suppose var2 = 5, then my note will look like this:
SELECTED OPTIONS
option 1 text
option 3 text
which is what I want. I was trying to avoid having a blank line between options 1 & 3 if option 2 is not chosen. I think the key is not having a space between the quotes up at the top of the relations.
--
Lyle Beidler MGS Inc 178 Muddy Creek Church Rd Denver PA 17517 717-336-7528 Fax 717-336-0514 <">mailto:-> - <">http://www.mgsincorporated.com> 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.