cancel
Showing results for 
Search instead for 
Did you mean: 

Export drawing to dxf

Legend
Legend

Hi,

I've found this journal https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&q=export+to+dxf&pd=nx&l... and the journal that I attach, but the first is very slow and I would like to select the folder to export. The journal I attach, doesn't work and export also the 3D in the dxf.

Can someone can help me or have a journal that export the drawing in dxf in a folder the I select and quickly, not in cgm and then in dxf.

Thank you...

Using NX 11 / RuleDesigner PDM

22 REPLIES

Re: Export drawing to dxf

Genius
Genius

Hi,

 

The first journal is a great start. You just need to finetune it.

I can do it for you.

 

Questions:

1) Add a folderbrowser to select the outputfolder each time? Or do you want to edit some variable inside the journal (if yo don't want to change the output location everytime)?

2) Do you want 1 exported dxf for all sheets? Or 1dxf for each sheet?

3) keep the log-files?

 

Below finetuned version, starting from the journal on the solution DB:

- doesn't care about mastermodel, just exports the drawings from the displayed part

- the are 3 variable in the journal to steer what to export and in which folder to put it.  (lines 26-28)

- removed to deltion of the log-files since there was a wait time of 20seconds in there. (if logs need to be deleted, let me know i have a cleaner method)

 

 

br

Fred

 

 

Re: Export drawing to dxf

Legend
Legend

Questions:

1) Add a folderbrowser to select the outputfolder each time? Or do you want to edit some variable inside the journal (if yo don't want to change the output location everytime)?

2) Do you want 1 exported dxf for all sheets? Or 1dxf for each sheet?

3) keep the log-files?

 

1) I would like to change the output location  everytime

2) I would like a dxf file for each sheet

3) I don't like log file

 

Thank you for your rapid support and interest for my problem.

Thank you...

Using NX 11 / RuleDesigner PDM

Re: Export drawing to dxf

Genius
Genius

Hi Cubalibre00,

 

Journal has 4 configuration lines that you can edit

Const blnExportSingleDXF As Boolean = True
Const blnExportMergeDXF As Boolean = False
Const blnDeleteLogFiles As Boolean = True
Const strDefaultOutputFolder As String = "D:\TEMP\" 'initial start folder for browser. Journal will read registery for last location

 

the last outputfolder is stored in the windows registry, So  the variable "strDefaultOutputFolder" is only used the first time you run the journal on your computer.

 

Let me know if you need anything else.

br

Fred

Re: Export drawing to dxf

Legend
Legend

Hi Fred,

sorry for the delay, but I've tested your journal but it's very very slow. For a simple file I need five minutes.

Attached the file to test.

Thank you...

Using NX 11 / RuleDesigner PDM

Re: Export drawing to dxf

Genius
Genius

Hi CubaLibre

 

Minor error in my code. Attached journal runs in 15sec on my laptop with your test part.

Additionally I added start and stop time in the logging and a journals setting to show output to the listingwindow.

 

Br

Fred

 

Re: Export drawing to dxf

Legend
Legend

Fred,
it's a perfect journal. It's rapid, very rapid.

Thank you...

Using NX 11 / RuleDesigner PDM

Re: Export drawing to dxf

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Impressive!

Can the CheckIfRunning function (Process.GetProcessesByName(...)) also be used on STEP and IGES export?

I tried it using CheckIfRunning("step214ug") but it does'nt detect the process, while I see it in the windows task manager.

 

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0

Re: Export drawing to dxf

Genius
Genius

Yes, it should work for any windows process. Process.GetProcessesByName() is part op VB.NET not NXopen.

Can you send me sample code to debug?

 

 

Re: Export drawing to dxf

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

I just added bits of your code to my existing code.

Could it be that the process check is executed while the step export process is starting up, but not yet running?

I see the list window reporting before the export step cmd window appears.

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0