Showing results for 
Search instead for 
Did you mean: 

Save in ISO journal



I've added a .men in a shared menuscript -> application folder to fit in ISO view the part during the save.

The code works fine, but I want to add the 'Advanced Simulation' application in the code.

I'm not the programmer, now I've added some row, the code doesn't work.

This is the code :

Option Strict On
Imports System
Imports NXOpen
Imports NXOpen.UF

Module NXJournal

Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim theUfSession As UfSession = UFSession.GetUFSession()
Dim moduleId As Integer = -1
Dim workPart As Part = theSession.Parts.Work
Dim workSimPart As CAE.SimPart = CType(theSession.Parts.BaseWork, CAE.SimPart)
Dim displayPart As Part = theSession.Parts.Display  
Dim displaySimPart As CAE.SimPart = CType(theSession.Parts.BaseDisplay, CAE.SimPart)

if moduleId = UFConstants.UF_APP_DRAFTING Then
	exit sub
		IF moduleId = UFConstants.UF_APP_MECHANISMS Then
		workSimPart.ModelingViews.WorkView.Orient(View.Canned.Isometric, View.ScaleAdjustment.Fit)
		IF not displayPart is nothing then
		'Il displaypart esiste, faccio il fit
			displayPart.ModelingViews.WorkView.Orient(View.Canned.Isometric, View.ScaleAdjustment.Fit)
		elseif not workPart is nothing then
		'Il workpart esiste ma il displaypart no, faccio il fit
			workPart.ModelingViews.WorkView.Orient(View.Canned.Isometric, View.ScaleAdjustment.Fit)
		'Non ho ne workpart ne displaypart, non faccio nulla
		end if
end if
End Sub
End Module


Thank you...

Using NX 11 / RuleDesigner PDM