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!
Solved! Go to Solution.
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!
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!
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.
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
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).
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled