Submitted by Stanvdm on Wed, 09/04/2013 - 19:02
Forums:
Hi,
I am trying to start a program that will export a step file from the drafting application. Because I am doing this with journal programming, I need to know how toswitch to Moddeling from the drafting application.
I don't find any reference to that, but perhpas someone here knows how this is done.
Thanks for the help in advance... :-)
Stan
re: export step file
You do not need to be in the modeling application to export step files, but you do need to have a license to do so.
However, if you want to switch applications via a journal; you can do that in NX 8 or later using the ApplicationSwitchRequest method.
I will try that thanks,
I will try that thanks,
I hope it is not a special licence, I am doing it while running NX. I assume you mean if it was automated. I reckon it should work if it is an interactive program.
StanV
re: step export license
I was referring to a "step export license" which you will need whether you are exporting step files interactively or programatically. If you bought a license "bundle", it may be included in that bundle. You will have to check your license options to see exactly what you have access to.
Proper ApplicationSwitchRequest Usage
What is the proper ApplicationSwitchRequest() usage in .net?
I've attempted the follow call:
NXOpen.MenuBar.MenuBarManager.ApplicationSwitchRequest("UG_APP_DRAFTING")
And received the following error:
Reference to a non-shared member requires an object reference
DHuskic
Nx 9 VB
re: Application Switch Request
To get the menu bar manager object, you have to go through the UI object:
Option Strict Off
Imports System
Imports NXOpen
Module Module1
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim theUI As UI = UI.GetUI
If IsNothing(theSession.Parts.Work) Then
'active part required
Return
End If
Dim workPart As Part = theSession.Parts.Work
theUI.MenuBarManager.ApplicationSwitchRequest("UG_APP_DRAFTING")
End Sub
End Module
Now, with that said, it should be noted that the application switch will only be made when the journal finishes. This is useful when you want to leave NX in a known state for the end user; but should not be used to gain the functionality of a certain application during your journal execution. As long as you have the proper license, the journal will have access to the functionality without switching to that particular application.
How to find the scale of a drafting view.
Hi,
I tried a view things but I end up finding the value for the scale of the view and I am actually after the View Scale factor of the geometry. So I am not after DraftingView.Scale
The value I get is relative to the screen and how the grahic view is in relation to the drafting view.
What I need to do is to find out what the scale is of a view so I can add that to my title block.
Thanks again....
StanV
re: drafting view scale
Try this instead:
theView.Style.General.Scale