cancel
Showing results for 
Search instead for 
Did you mean: 

NX 11: Importing .exp file to expressions

Experimenter
Experimenter

Hi!

 

I have a program that auto generates .exp files that is use in NX 8.5 expressions. When testing NX 11, I can only choose .xlsx, .xls and xlsm files when browsing in the "Import and Export Expressions" menu. Is it possible to import .exp files to expressions in NX 11? 

 

Thank you for your help!

9 REPLIES

Re: NX 11: Importing .exp file to expressions

Siemens Phenom Siemens Phenom
Siemens Phenom

When I pick the import button mine comes up with .exp files as the only option for import.

 

Import Expressions MenuImport Expressions Menu

 

Scott

Re: NX 11: Importing .exp file to expressions

Experimenter
Experimenter

The option for importing and exporting expressions is in a collapsed group. I had to expand the group first for it to become visible. See the steps below.

 

2017-01-04_9-42-00.png2017-01-04_9-43-09.png

 

Windows 7-64 - Precision M4800 - 16GB - Quadro K2100M - NX 10.0.3.5 MP13 - Teamcenter 11.2 - ANSYS 17.2

Re: NX 11: Importing .exp file to expressions

Experimenter
Experimenter
I didn't find the collapsed group at first so instead i selected import and export expressions from the menu/tools dropdown list. There i could only import the file types mentioned in my first post. Thanks for the help!

Re: NX 11: Importing .exp file to expressions

Pioneer
Pioneer

Hi, thanks for the answer (I had a similar problem). 

 

 

I developed a tool for NX 10 which automatically imports and updates a CAD model with multiple sets of expressions. I tried to run it on 11 but it didn't work. Do you know if the NXOpen commands for this kind of operations are left untouched? Since the expression interface has been modified i thought that the libraries could have been modified as well. 

 

Thanks for the help! 

Francesco 

Re: NX 11: Importing .exp file to expressions

Experimenter
Experimenter

Hey, your tool would be a huge help for my task!

Would you send it to me? (via Mail or just the source Code)

That´d be great!

Greetings, Optokoppler

Re: NX 11: Importing .exp file to expressions

Pioneer
Pioneer

I'm sorry but i can not reveal all the code of my code. 

 

Essentially, all that is required to perform the described task is to perform the following: 

 

- Import expression file 

- doupdate of the model

 

you can look it up both with a simple journal recording. 

Re: NX 11: Importing .exp file to expressions

Experimenter
Experimenter
Ok, it was worth a try Smiley Happy

It seems like a have the same problem you had two years ago trying to make a reverse engineering application.
Maybe you´ll able to help me, for I am new to NX programming:

Is SNAP capable of getting defined expressions of a part and update their values with imported
expressions. Or do I need to operate with NX Open?

If yes, would you name the main steps (or existing journal names) to do so in SNAP?

Thanks for your time and your first reply!

Re: NX 11: Importing .exp file to expressions

Pioneer
Pioneer

The following is in visual basic: 

 

  'imports the updated expressions
        Dim expModified1 As Boolean
        Dim errorMessages1() As String = Nothing

        workPart.Expressions.ImportFromFile(path_new_expression, NXOpen.ExpressionCollection.ImportMode.Replace, expModified1, errorMessages1)

        Dim markID_update As NXOpen.Session.UndoMarkId
        markID_update = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Update expression data")

        Dim nerr2 As Integer
           'update of the model
            nerr2 = theSession.UpdateManager.DoUpdate(markID_update)

that's it basically. 

i can't quite remember if this is all open or snap but with a two minutes search in the api i think that you can easily look it up. 

 

tell me if you need anything else. Maybe it's best if we do this by email though

Re: NX 11: Importing .exp file to expressions

Esteemed Contributor
Esteemed Contributor

I know the dialog to edit expressions changed for NX11.

Perhaps you could record a journal importing the EXP file and see if the calls changed (maybe do the same thing in NX10 & NX11, and compare the 2 journals).

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled