Cancel
Showing results for 
Search instead for 
Did you mean: 

Un supported functions in NX journalling

Creator
Creator

I was trying to develop a NX open  code(which runs in batch mode) to export a model from ug part file(*.prt)) to parasolid

 process goes like this

1. open part file

2. update expressions from external excel file(here part dimensions will be changed based on the values entered in external excel file which is mapped in the part file expression )

3. save part

4 export to parasolid

5. exit or close


i created a vb journal which does all of this except  step 2 . im unable to find nx open/  UFUNC function equivalent to "refresh expression from external excel file

 

any help is highly aapreciated

6 REPLIES

Re: Un supported functions in NX journalling

Honored Contributor
Honored Contributor

There's some code here that deals with NX expressions and Excel files. It probably doesn't do exactly what you want, but might serve as a good starting point. The OP of the thread later deleted his replies, so I look like a lunatic talking to myself, hopefully you can make some sense out of what was going on based on my replies...

Re: Un supported functions in NX journalling

Creator
Creator
hi Cowski ..i had look on the link you have provided which actually used to switch between expression(excel) files .but what am i trying to do here is just to update refresh the expression values from the excel file to update the model.

thank you so much for your reply .

Re: Un supported functions in NX journalling

Phenom
Phenom

I think "Update for External Change" is required. I'm not sure if it is available in API.

Re: Un supported functions in NX journalling

Creator
Creator

yeah ! this is what I'm looking for ...can anyone confirm if "Update for External change " is supported by API or not?

Re: Un supported functions in NX journalling

Legend
Legend

There is no API function.  But a work around is to use KF.  See this link.

 

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&dt=nx-api&q=%22external...

Re: Un supported functions in NX journalling

Siemens Phenom Siemens Phenom
Siemens Phenom

If you can get your expressions into an .exp file, then you can use UFModl.ImportExp() which is the wrapper method for UF_MODL_import_exp() to pull them into your part.  You can update the model to use the new expressions with either the wrapper for UF_MODL_update() or UpdateManager.DoUpdate().