import strings to expressions
import strings to expressions
(OP)
Hello!
I´m using expressions to build some of my models and I am struggling to import "string-parameters"
I am using excel to store and export my formulas and values.
I am trying to create and import the formula TH02 = "M20 x 2.5", when I´m trying to import the formula it looks like this:
[]TH02="M20 x 2.5"// and I get the error-statement:
Errors importing expressions into part RRM200023478/A
[]TH02="M20 x 2.5"//
- Datatype error
I am using Nx6
Best regards
/Martin
I´m using expressions to build some of my models and I am struggling to import "string-parameters"
I am using excel to store and export my formulas and values.
I am trying to create and import the formula TH02 = "M20 x 2.5", when I´m trying to import the formula it looks like this:
[]TH02="M20 x 2.5"// and I get the error-statement:
Errors importing expressions into part RRM200023478/A
[]TH02="M20 x 2.5"//
- Datatype error
I am using Nx6
Best regards
/Martin





RE: import strings to expressions
Unfortunately I cannot offer any help with your core trouble I do not interface with outside applications to manage my expressions. It sounds to me like you have not established TH02 as a string variable.
RE: import strings to expressions
RE: import strings to expressions
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: import strings to expressions
See the attached example files (an NX 6.0 part file and an Excel file) for an example of how this works.
After loading these files on your system you will need to open the NX part file and in the expression dialog you will need to edit the path portion of the expression so that it matches the path to your spreadsheet file on YOUR system. For example, in my file the expression 'THO2' has a value of:
ug_cell_read( "D:\User_files\NX_6_Demo\Test_exp.xlsx", "B4" )
You will need to change the underlined portion of this expression to reflect the path where the Excel is located on your system in order for this to work.
Anyway, give this a try and see if it does what you need.
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: import strings to expressions
I used this: (String)TH02="M20 x 2.5"
instead of: []TH02="M20 x 2.5"//
and it worked fine
RE: import strings to expressions
Thanks for your support.