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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Relations in WF4 - Insert a text file

JWayman
12-Amethyst

Relations in WF4 - Insert a text file

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


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.
3 REPLIES 3

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. ............

...................

.................

....................

JWayman
12-Amethyst
(To:akrenzer)

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.

http://communities.ptc.com/thread/39088

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags