Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to output parasolid 1

Status
Not open for further replies.

dz71pn

Automotive
Mar 25, 2009
1
I have a macro that will export a solid to a parasolid file. My only problem is that it always names the output file the same. Is there a way to enter a variable name (when recording the macro) so that the output file name is the same as the partfile name? And, what is the variable name if this is possible?

Thanks for any help.
 
Replies continue below

Recommended for you

What version are you using?

If you tick on the "User Entry on File Selection Dialogs", just after you start recording a macro then when you play it back it should pause to let you type a different file name.

Best Regards

Hudson

www.jamb.com.au

Nil Desperandum illegitimi non carborundum
 
Did the 'user entry' option work for you?

I have a very similar situation where I'd like to programmatically output a parasolid but none of the options seem to work. I can't use variables in a macro, and neither grip nor journaling support exporting parasolids.

Does anyone know if the NX API can export a parasolid and is it possible to modify a journal to do it?
 
In journaling the following function should work for exporting parasolid.

Public Sub ExportData ( _
body_list As Tag(), _
file_name As String _
)

It is a wrapper for API method UF_PS_export_data..

Hope this helps,

Suresh
 
Suresh,
Thanks for pointing me in the right direction.

I'm getting an error when I try to call the export data subroutine. The error says "Value of type 'NXOpen.Tag' cannot be converted to '1-dimensional array of NXOpen.Tag'."
Attached is my journal file.

Anyone have any ideas?
 
 http://files.engineering.com/getfile.aspx?folder=604883ad-4cc0-4ea2-ae18-9e18ae427c23&file=export_parasolid.vb
Fantastic!

Thanks for the help, Suresh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor