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
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
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
RE: Writing Journals: Export solid models
<http://www
Chris T.
Project Design Analyst
Kohler Co. Engine Division
RE: Writing Journals: Export solid models
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
Frank Swinkels
RE: Writing Journals: Export solid models
@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
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
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
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
Frank Swinkels
RE: Writing Journals: Export solid models
Let me know how it works.
Regards
Frank Swinkels
RE: Writing Journals: Export solid models
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
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 hope the knee replacement goes well and you have a speedy recovery.
Regards
RE: Writing Journals: Export solid models
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
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
Frank Swinkels
RE: Writing Journals: Export solid models
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
Frank Swinkels
RE: Writing Journals: Export solid models
Thanks for you time.