Exp formatting for String varibles
Exp formatting for String varibles
(OP)
UG NX 5
Windows XP 64-Bit w/Excel 2007
I am importing .exp files into UG using a journal file to create a large amount of drawings. I have done this successfully with other product lines but now I need to import a few string variables into the model. The problem is, UG seems to be adding extra double quotes around my variable when it imports. In the .exp it looks like this:
(String) Part_Number="12500130"
However I get an error from UG like this:
"(String) Part_Number=""12500130"""
If I remove the double quotes from the .exp like so:
(String) Part_Number=12500130
Then UG will import the value as 12500130 just fine but being that there aren't and quotes around it, the value does not update in the drawing. Am I formatting something wrong in the .exp or is there some type of manipulation I can do once the value without quotes gets imported into my expressions?
Thank you,
Jake Clever
Windows XP 64-Bit w/Excel 2007
I am importing .exp files into UG using a journal file to create a large amount of drawings. I have done this successfully with other product lines but now I need to import a few string variables into the model. The problem is, UG seems to be adding extra double quotes around my variable when it imports. In the .exp it looks like this:
(String) Part_Number="12500130"
However I get an error from UG like this:
"(String) Part_Number=""12500130"""
If I remove the double quotes from the .exp like so:
(String) Part_Number=12500130
Then UG will import the value as 12500130 just fine but being that there aren't and quotes around it, the value does not update in the drawing. Am I formatting something wrong in the .exp or is there some type of manipulation I can do once the value without quotes gets imported into my expressions?
Thank you,
Jake Clever





RE: Exp formatting for String varibles
Also how do you know that the notes on your drawing which are linked to the expressions are NOT updating? Have you tried selecting...
Tools -> Update -> Update for External Change
...to force an update?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Exp formatting for String varibles
The journal loads a different .exp file for each of about 10,000 drawings. I load the dimensions this way so I thought it would be easier to just load my part number and type using the same exp file. The type is really the issue because it is letters like "STD", "BEVEL", and "SQB". In the expressions table, the formula column updates when I import without quotes but the value column does not because it needs quotes to be a string. I was able to import the 3rd atribute as a constant to solve part of my problem but the other 2 are still not working.
Thanks for your help,
Jake
RE: Exp formatting for String varibles
(String) part_no="12345"
(String) part_name="test_part"
...I had not problems with them coming across as valid String Expressions.
Note that I tested this using NX 5.0.6.3
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Exp formatting for String varibles
Thanks for your help John!
RE: Exp formatting for String varibles
I decided to try your manual method to import a string to start my troubleshooting. This is lies with the file format that I am using in excel. When I save my .exp I am using a Tab Delimited Text file format. However, this format does not like quotations. It adds additional quotations in a manner that matches the error I am getting in UG. Can you help me out by telling me how you are saving your .exps?
Thanks again!
RE: Exp formatting for String varibles
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Exp formatting for String varibles
I hope this helps,
Thanks John
RE: Exp formatting for String varibles
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Exp formatting for String varibles
Thanks again for your help,
Jake