×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Writing Journals: Export solid models

Writing Journals: Export solid models

Writing Journals: Export solid models

(OP)
I want to write some journals that automate the export of solid models. Parasolids are the preferred type we would like to automate. Is this possible? I don't see a parasolid export as an option for NX5 or NX6. We will be upgrading to NX7.5 mid-summer.

RE: Writing Journals: Export solid models

Exporting a Parasolid is NOT 'journalable' in NX 5.0 or NX 6.0, or for that matter in NX 7.5.  Therefore you will need to use NX Open as an alternative and create a custom program to do that.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Writing Journals: Export solid models

You can however automate Iges and I belive you could also automate step using the same methodology that I've seen as these have exe files that you can fire up from a journal.
Not your ideal but a possible solution.

Mark Benson
Aerodynamic Model Designer

To a Designer, the glass was right on CAD.

RE: Writing Journals: Export solid models

(OP)
I would like to automate any/all of these formats. Unforunately I think NXOpen is way over my head. Wouldn't even know where to begin.

RE: Writing Journals: Export solid models

When I said that Exporting a Parasolid was NOT 'journalable' what I meant was that you could NOT record a Journal file which would export a Parasolid since the Export -> Parasolid dialog is not suitable for Journalizing.  Granted, one could manually WRITE a journal but that would require at least some programming experience.

Now if you were able to find an existing manually written Journal which does the job great...

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Writing Journals: Export solid models

Attached is a VB file to run as a journal for writing out parasolid parts.  It asumes you have an assembly then for each component all solid bodies are collected and the component name is changed for wiriting out the parasolid file.  This may not be quite what you want.  It does show that it is easily done.  Let me know if you want it to de different.

Frank Swinkels

RE: Writing Journals: Export solid models

(OP)
Thank you all for your help. I do have limited experience with .vb programming and have customized journals in the past.

@FrankSwinks
I'm not sure if this journal is working. It doesn't give me any errors, however, I'm not being prompted as to where to save the file and I can not locate where its being saved.
In a perfect world, I'd like the journal to be able to export all solid bodies displayed in modeling (not blanked or turned off in layers) whether it be a single component or an assmebly. Then if possible, I'd like to downgrade the parasolid version to NX1.0 and prompt where to save it.

RE: Writing Journals: Export solid models

The first journal only worked for assemblies.  The next journal now tests if the part is a component or piece part.  That is the attached journal will now work for either piece part or assembly.

For either we now use parasolid version 14.0 which is suitable for NX1.

For the piece part I disregard blanked solids and if the solid is on a hidden layer.

I don't prompt for a directory.  The parasolid file is placed in the path of the partfile.  I rename the part file by replacing ".prt" with for example "_bodies_5_xt.x_t".  Here 5 is the number of bodies in the file.  You will need to let me know how much of the file name you wish to enter or do you want a windows dialog.

Finally let me see if I have it right for an assembly.  Do you want only one parasolid file which includes displayed solids in components that are not suppressed or blanked?

Frank Swinkels
 

RE: Writing Journals: Export solid models

(OP)
@FrankSwinks
Thanks for your help! The parasolid export does work both with single components as well as assemblies. That is exactly what I needed. However, we have all our cad files in Teamcenter, therefore, it cannot export the parasolid to the same directory. I need to be able to put it in a hard location (i.e. C:/Parasolids). As far as the naming goes, I was thinking of doing something like the following:

Dim strPartNumber as string
Dim strCurrentDate as string

strPartNumber = workPart.GetStringAttribute("DB_PART_NO")
strCurrentDate = format(Today, "MMddyy")

[Export Filename] = "C:\Parasolids" & strPartNumber & "_" & strCurrentDate & ".x_t"

Doing this would take the attribute already assigned as our part number and just add the current date behind it. Thanks again for your help.

RE: Writing Journals: Export solid models

(OP)
@FrankSwinks
How can I revise your current journal to set a specific directory for export (i.e. C:/Parasolids)? Thanks in advance.

RE: Writing Journals: Export solid models

Sorry, I did not realize that you needed the extra programming.  I will have it done in a couple of days.

Frank Swinkels

RE: Writing Journals: Export solid models

Hi Frank,

I'm new to NX and to this forum so please excuse me. I am trying to export displayed data as parasolid and came across your code. When I tried to run the journal I got a Journal Execution Error stating "No main found."

Can you help me?

Note: I am using NX75.

Thanks

RE: Writing Journals: Export solid models

I don't know which journal you are refering to.  For me to help I will need to see the specific journal.

Please note I will not be available for the next week (in hospital for a knee replacement).

Frank Swinkels

RE: Writing Journals: Export solid models

I'm referring to the journal posted above my post dated 5 Feb 11 1:35. Filename ExportParasolid3.zip.

I hope the knee replacement goes well and you have a speedy recovery.

Regards

RE: Writing Journals: Export solid models

OK I am back from the knee replacement.

The journal (ExportParaSolid.vb) uses a naming convention for the parasolid file which is an attribute name (DB_PART_NO).  The attribute value together whith a current date is used for the file name.  If the attribute does not exist then no parasolid file is created.

Let me know if you want to use some other form of file naming.

Regards

Frank Swinkels
 

RE: Writing Journals: Export solid models

Hi Frank,

I am using, your two macros ExportParaSolid2.zip and ExportParaSolid3.zip

The ExportParaSolid2.zip macro works perfect, it generates the parasolid files where the .prt files are located.

But the ExportParaSolid3.zip macro, I execute it and it dosen't tell me where I want to place my parasolid files.

I have added DB_PART_NO, but no luck.

Thanks.

RE: Writing Journals: Export solid models

ExportParaSolid3 places the parasolid files in a directory C:\Parasolids.  Did you want the journal to ask for a directory?

Frank Swinkels

RE: Writing Journals: Export solid models

Hi Frank,

If it is possible yes...

and how can I change the journal for exporting

to IGES and STP file formats?

Thanks.

RE: Writing Journals: Export solid models

Ok Frank,

Thanks for you time.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources