×
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

MR NX 8.0.3.4 - journal won't work now

MR NX 8.0.3.4 - journal won't work now

MR NX 8.0.3.4 - journal won't work now

(OP)
Please help me to get this journal working again, It's one of cowski's masterpieces...
I've just put the latest maintenance pack on and it no longer works, maybe they've changed something in NX open or something...
It's the dxf creator, which exports, and imports a .cgm, and exports that.
usually you watch the drawing appear in model space, then turn white, and finish back in the drawing sheet...
Now, it flashes open the model space, then flashes a blank drawing, then goes back to the drawing sheet, and completes the dxf, without errors. But if you open the dxf, there's nothing in it and it just shows the model-space background colour.
What's weird, is i point the journal at my template part, and the background colour is different to what you see running the journal.
I've tried changing it to "Blank" but then it says it has an error in file creation.
Any help much appreciated...

RE: MR NX 8.0.3.4 - journal won't work now

There should be log files created in addition to the dxf files, do the log files report any errors?

As a guess from your description, I'd say it is not finding your specific template file (I remember we customized your version because you don't use the "blank" template). Were there any other environmental changes when you upgraded to NX 8?

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
ponderCowski,
Thanks again for your help, I've been using it sucessfully in NX8 on MR 8.0.2 but i put on maintenance 8.0.3 and now it no longer works.
The log file doesn't give any errors, here are a sample dxf, and log file.
You're right about pointing to my template, but i do still have the "Blank" template available,(other users don't), but when i changed the journal to read "Blank", instead of "BUSTECH.prt" it errors, saying "the selected template doesn't exist" (but it does)
So, if it can't read the "Blank" part, and it's not using my "BUSTECH.prt" template, then what is it using?

RE: MR NX 8.0.3.4 - journal won't work now

Run the following code to see if your template is listed in the output.

CODE

Option Strict Off  
Imports System  
Imports NXOpen  

Module Module1  

    Sub Main()  

        Dim theSession As Session = Session.GetSession()  
        Dim workPart As Part = theSession.Parts.Work  
        Dim lw As ListingWindow = theSession.ListingWindow  
        lw.Open()  

        Dim templates() As String  

        templates = theSession.Parts.FileNew.GetAvailableTemplates  
        For Each temp As String In templates  
            lw.WriteLine(temp)  
        Next  

        lw.Close()  
    End Sub  


    Public Function GetUnloadOption(ByVal dummy As String) As Integer  

 'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination  

    End Function  

End Module 


If you want to try to use the blank template, change the NewFile subroutine to the following (changed lines highlighted):

CODE

Sub NewFile(fullpath as string, units as integer)  
	  
	Dim fileNew1 As FileNew  
	fileNew1 = theSession.Parts.FileNew()  
	  
	  'the template file name will be the filename as it appears in the template directory (or as listed by the "file_new_templates.vb" journal)
	  'change the fileNew1.Application to match the application launched when you start a new file with the template
	  'also, make sure the fileNew1.Units matches the part units of the template
	  'when everything matches up it should work, otherwise you will get a 'template not found' error
	  'fileNew1.TemplateFileName = "BUSTECH.prt" (comment this line out)
	fileNew1.Application = FileNewApplication.Modeling  
	fileNew1.Units = Part.Units.Millimeters  
	  'fileNew1.Units = Part.Units.Inches
	fileNew1.NewFileName = fullpath  
	fileNew1.MasterFileName = ""  
	fileNew1.UseBlankTemplate = True 'change from False to True  
	fileNew1.MakeDisplayedPart = True  
	  
	Dim nXObject1 As NXObject  
	nXObject1 = fileNew1.Commit()  
	  
	workPart = theSession.Parts.Work  
	displayPart = theSession.Parts.Display  
	  
	fileNew1.Destroy()  
	  
End Sub 

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
cowski,
the template enquirey is finding all that it should, i then changed the lines you showed and ran the journal, it seemed to work slightly differently, and the end result is a black square, not the shaded background.
It must be something that they've changed in the MR as I've not updated the other users, and they work fine still.
Have you installed this maintenance yet?

RE: MR NX 8.0.3.4 - journal won't work now

We recently upgraded to NX 8 (I'm currently running 8.0.1.5). The dxf journal is working for me, the version I'm running can be found here; this version works for both TC and native and has a few other tweaks to make it more robust. This version won't solve your problem though, as it still references the "blank" template. I'll have to talk to the guy in charge of CAD updates to see when/if we'll be installing 8.0.3.4.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
Cowski,
I've tried to run the version you linked to, but it fails to find the drawing file for some reason, but this is not to do with the maintenance update, as i tried to use it a while ago (on 8.0.2), when your journal site was only just open (nice job by the way)..
The routine then just hangs, and has to be stopped.
I wonder what is causing this not to work on my set-up, i know it works ok for other people i've spoken to...

RE: MR NX 8.0.3.4 - journal won't work now

Let's try this: start the journal recorder and create a new file based on your bustech template then stop the journal recorder and post the resulting journal code. Perhaps we are missing a setting or two during the new file creation. (Assuming the new file creation is the problem.)

Also, run the version that is listed on the website again. That one writes information to the NX log file as it executes. After it errors out/quits working, open the NX log file (Help -> Log File) and scroll down to the end to see what information the journal has written.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

moog2,
The log file indeed indicates that it is not finding the template file. I noticed a couple of minor differences in the journal you recorded vs my journal code; I've incorporated those changes into this code, hopefully it will take care of the problem. If not, post back with a description of what happens.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
Cowski,
it still hangs i'm afraid, say's can't find the file , press a key to continue..

log says..

Part::SaveManager saved 1 parts successfully.
Adding file to kill list: X:\Paul\test-dxf\CHAD-1501_dwg_1.cgm
Adding file to kill list: X:\Paul\test-dxf\CHAD-1501_dwg_1.prt
DXF file: X:\Paul\test-dxf\CHAD-1501_dwg_1.dxf
Calling export DXF routine
ExportDXF(X:\Paul\test-dxf\CHAD-1501_dwg_1.prt, X:\Paul\test-dxf\CHAD-1501_dwg_1.dxf)
Teamcenter Integration: capability TC_is_Teamcenterized is disabled
DXF/DWG Export: Export translation job submitted.Waiting on creation of DXF file...
&MACRO FOCUS CHANGE OUT 1
&MACRO FOCUS CHANGE OUT 1
&MACRO FOCUS CHANGE IN 1
&MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR ! <MB/Toolbar>
Successfully loaded dynamic module C:\Program Files\Siemens\NX 8.0\UGII\libhelpint.dll
Loaded module C:\Program Files\Siemens\NX 8.0\UGII\libflat.dll 7fef22b0000 75000 f88380c4-4559fe44-6961059c-64842caf-1=libflat___134435542064 version = 8.0.3.4
Loaded module C:\Program Files\Siemens\NX 8.0\UGII\libsmdint.dll 7fed02b0000 1e2000 60c886c6-4a9f5f38-4f3030a2-3bf4a935-1=libsmdint___134437389864 version = 8.0.3.4
Loaded module C:\Program Files\Siemens\NX 8.0\UGII\libmodlint.dll 7fed8c00000 405000 5d705a58-4efb405c-b3f1b592-2e67ced7-1=libmodlint___134437650664 version = 8.0.3.4
Loaded module C:\Program Files\Siemens\NX 8.0\UGII\libhelpint.dll 7fed04a0000 124000 20b20dc1-47eef2f7-17103bb6-b74e380a-1=libhelpint___134437694464 version = 8.0.3.4
Loaded module C:\Program Files\Siemens\NX 8.0\UGII\libjadex.DLL 7fed31e0000 e8000 96c7f0e7-493de6a9-e6190ab-3a588a0b-1=libjadex___134435610164 version = 8.0.3.4

it doesn't create a dxf file now
Any other ideas?

RE: MR NX 8.0.3.4 - journal won't work now

I'm running out of ideas.
I might have to wait until we get that MR installed to do more testing.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
ok, thanks, did they give you any indication when that might be?
If it's months away i might re-install back to 8.0.2hourglass

RE: MR NX 8.0.3.4 - journal won't work now

No word yet, but the admin is currently involved in putting out some fires and a few other more important projects.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

I'm running NX 8.0.3.4 now. The dxf output journal seems to be working; a dxf file is produced and the log file indicates no errors. I am, however, having trouble importing the file back into NX to verify it. The dxf export log indicates thousands of lines/arcs created, but the import log only reports a couple of views and layouts were imported (no geometry). The translator appears to run, but I end up with an empty file.

Still looking into it...

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
Cowski,
I just wondered if you'd managed to fix this journal yet, I've just tested the one off your journalising web site, but i get the error, where it say's it can't find the file (which is the displayed part)
I've just tried the custom one you did for me, and now it actually outputs the dxf, but (in a single sheet drawing), it duplicated the sheet 4 times, in the actual UG part, making it a 5 sheet drawing,and outputs 5 dxf files, when i view the dxf files, there is nothing in them

P.S I'm using 8.0.3.4

RE: MR NX 8.0.3.4 - journal won't work now

Due to my current workload, I've not been able to devote a block of time to track this one down. I have run various tests but so far the results are inconclusive. I've double checked the dxf output with the free edrawings viewer; this shows that there is geometry in the dxf output file. However, when I try to import it to NX, no geometry shows up. The layer list shows zero objects even when the dxf import wizard shows the correct preview. I'm starting to think it may be an internal NX import issue, though I'm not confident enough about that yet to take it to GTAC.

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
ok, i'll keep my fingers crossed, Thanks.

RE: MR NX 8.0.3.4 - journal won't work now

I think that I've found the problem, there seems to have been a change with the NXOpen cgm importer in NX8. In NX8 when you use the menus to interactively import a cgm file, the geometry is placed in the current work view; but when NXOpen imports the cgm, a new drawing sheet is created and the geometry is placed on the sheet. Now when you export a dxf, this geometry is not getting exported. As far as I can tell, this is a change from NX7.5 and below.

To see the difference for yourself, do the following:

  1. Open a drawing, export cgm file of the drawing.
  2. Create a new file.
  3. Start journal recording, import the cgm file.
  4. Stop journal recording, note geometry is in model view.
  5. Delete geometry.
  6. Replay the recorded journal.
  7. Note drawing sheet was created and cgm geometry is on new drawing sheet.
I've opened an IR with GTAC (6848806); I'm waiting to hear back whether that change was intentional or not...

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
aahHHAaa...that's interesting, yes, same thing happens here..... thanks for the update

RE: MR NX 8.0.3.4 - journal won't work now

GTAC gave me a workaround while they look into the issue; there was an ER to the NXOpen function that looks like had some unintended consequences with the .NET function. The good news is, it looks like the workaround takes care of the problem.

I've updated my journal, the latest version can be found here:
http://nxjournaling.com/?q=content/export-drawing-...
or you can get it from
https://dl.dropbox.com/u/80688373/NXJ_drawing_dxf....

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
I'm afraid it didn't fix the problem here, the same thing happens, 5 sheets are created, the draft file brings all the views and border into modelling space and then it gives this error (also the spaceball stops working)
if you go into sheets 2->5 it looks fine but the actual sheet 1 has been deleted

RE: MR NX 8.0.3.4 - journal won't work now

Looks like it may be deleting a temp file before it is supposed to.

If you run it on a 1 sheet drawing, does it give the same error?

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

(OP)
that WAS a sheet one drawing, IT creates all the extra sheets on its own !
Should i send you some sample parts i used (before and after), or a log file?
P.s. the blank part is available, so its nothing to do with that..

RE: MR NX 8.0.3.4 - journal won't work now

I've sent an email to you, you can reply to it with any logfiles/testfiles attached...

www.nxjournaling.com

RE: MR NX 8.0.3.4 - journal won't work now

@cowski, I've been working with moog on this as I work for his reseller as a support engineer.
Can I get you to contact me directly? There are some things I want to get your opinion on in regards to this problem.

Anthony Galante
Technical Resource Coordinator

NX5.0.6, NX6.0.5, NX7.5.0-> NX7.5.5 & NX8.0.0 -> NX8.0.3.4, NX8.5.0.23

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