Extracting data from drawing name in forms
Apr 13, 2010
10:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 13, 2010
10:51 AM
Extracting data from drawing name in forms
Hello, I am creating a drawing form for a company. The drawing name, file name, has the syntax RT345891. I want to rewrite this in the drawing to 4-345.891. In the form I have the parameter &dwg_name which writes the file name RT345891 in the drawing. My idea was to use the function: partofmydrawingnumber = extract(&dwg_name,3,3) to create the new string in a repeat region as a relation. But the parameter &dwg_name is not recognised in the relation as an parameter, it creates an error message. Do anyone know how I can use the &dwg_name, another name for the file name parameter or any other get around? What is the syntax to create these parameters in the form but have them echoed in the drawing?
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.
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.
Labels:
- Labels:
-
General
5 REPLIES 5
Apr 14, 2010
04:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 14, 2010
04:33 PM
I think you need to get the "&" out of your extract function; the & is a special character for printing a value in tables and notes, but the parameter name itself is just dwg_name.
Apr 23, 2010
08:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 23, 2010
08:07 AM
I did not succeed. I cannot find a parameter with the models name, file name, thet can be used in a relation in the form. I believe this is because the form cannot see any model. So I created a parameter and a relation in the part instead. Something I did not want to do, as I do not want relations in the start part...
Apr 23, 2010
02:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 23, 2010
02:04 PM
I'm not sure exactly what you are trying to do, but you can write a relation in the drawing to extract the model name as a starting point. Try "NAME=rel_model_name()". "[/b]&NAME "in the drawing will now show the source model name.
Apr 23, 2010
02:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 23, 2010
02:15 PM
Then, of course, you can operate on your new parameter "NAME". Assuming from your example that you just arbitrarily add the "4-" at the beginning of the new parameter you are trying to create (I don't know where that comes from), you would then create another parameter something like this: X=extract(NAME,3,3) Y=extract(NAME,6,3) NEW_DWG_NAME="4-"+X+"."+Y
Apr 23, 2010
02:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 23, 2010
02:17 PM
Ignore that stray "[b]" in the post before last.
