Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Good morning,
I have searched for an answer, but I can't find one. It's probably out there, though...
We have a Yes/No parameter in our StartPart called 'Keypoint_drg'. If the parameter is set to 'Yes', I would like to insert, automatically, the contents of a text file into the drawing.
I got as far as:
>>>if KEYPOINT_DRG == yes
keypoint_text == " "
else
keypoint_text == "NOTE: THIS DRAWING IS A KEYPOINT DRAWING ONLY.
error Unmatched quotes
THIS DRAWING DOES NOT CONTAIN ALL INFORMATION TO
error Extra symbols found - ignored.
MANUFACTURE THIS PART.
error Extra symbols found - ignored.
IT MUST BE READ IN CONJUNCTION WITH THE PRO/ENGINEER
error Extra symbols found - ignored.
MODEL DATA FILE LISTED BELOW:
error Extra symbols found - ignored.
&model_name .PRT , REVISION &PROI_REVISION, VERSION &PROI_VERSION
error Invalid number in relation.
3. UNLESS SPECIFIED OTHERWISE, THE TOLERANCE BETWEEN
error Extra symbols found - ignored.
ANY FEATURE IN THIS PART AND ANY OTHER FEATURE SHALL
error Extra symbols found - ignored.
BE THE DEFAULT TOLERANCE.
error Extra symbols found - ignored.
NO DIMENSIONING SCHEME IS IMPLIED IN THE CAD MODEL
error Extra symbols found - ignored.
"
error Unmatched quotes
endif<<<
Clearly, the relations editor is not keen on multi-line values in its quotes. Is there a way to include line-feeds in relations?
I have the requisite text in a notepad file, but I can't work out how to write a relation to make a parameter equal to the contents of a text file.
Any suggestions?
WF4, M220
Thanks,
John
John,
Try adding a backslash at the end of each line "\" as shown below. This indicates a line continuation to the program.
"NOTE: THIS DRAWING IS A KEYPOINT DRAWING ONLY.\
THIS DRAWING DOES NOT CONTAIN ALL INFORMATION TO\
MANUFACTURE THIS PART. ............
...................
.................
....................
Thanks, Art.
I tried this, but I got the error message 'exceeded line length'. This even if I only extended the message by a single line.
I remember having used the \ in long relations previously, with some success, but it doesn't seem to help with notes.
John
John ,
Have you tried using =="this text" +"that text" + "the other text"
Otherwise, this has a bit more of what you may be looking for.