Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Templates

Status
Not open for further replies.

KUAERO

Aerospace
May 9, 2010
29
To all with great advice for a newbie in UG NX7.0,

I have a part file of an aircraft wing which I have created and I would like to do several things fter all the 3d modeling in done:

1) Create a drawing sheet with a specified template of borders and text. Automate this process such that I could click a button in NX to pull up my drawing templates.

2) On the drawing sheet, I know how to get sections to be displayed of the wing. However, I would like to create section cuts along the wing and show it on my drawing sheet and automate this process such that I can do the same for a different wing part file. Would this mean that I would have to pogram in NX Open, GRIP or create Macros/journals to do this?

Your kind advice would be appreciated.

 
Replies continue below

Recommended for you

Number one is basically what the File New functionality already does. If you have your own drawing borders you can simply replace our existing ones with ones which have the same name or you edit the .pax file which controls the content of the File New dialog and add/replace your own Drawing Templates.

As for Number 2, you could created one of those Drawing templates with a dummy part with several section views already defined. When you use this for a new part, you have to manually edit each section symbol so that it's at the proper location along the lenght of the wing, but at least you would not have to start from scratch each time.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
John,

I am just curious whether you would manually edit each section name cut if for example I was to use the drawing template on a wing part of larger length. In that case, is it possible to use the drawing template for the dummy part by importing it into which ever part that I am currently working on?

KUAERO
 
The idea is to Open the Template with the Master Model as the 'Referenced Part' (you will see that entry at the bottom of the File New dialog which defaults to the currently Displayed Part). It's best to create your Drawing template using a dummy part which is as close as practical to size and shape of the parts that you would normally be dealing with, if for no other reason than to allow you to size and position the views a best you can on the template. Of course, the views can be moved, extra ones removed and additional ones added.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Thank you so much for your advice and suggestions. i believe that it will be very helpful as I set on another task. Is there a way in UG NX to use the same drawing template for different sized sheets?

KUAERO
 
Not that I'm aware of. I use Custom Symbols to define my Drawing sheet artwork and had to create a unique part file and subsequent Symbol for each Drawing size, which I then added to the actual Drawing template files.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
We use one template file with 3 borders superimposed on eachother. Each border is on different layers. To switch borders just turn on/off the correct layers. We have set up nx open programs to do this for us and also change the paper size. It works well to change border size for an existing drawing just click a button. Another bonus with one template is there is only one place to change any template defaults.


NX 7.0.1.7, TC 8.1
 
Is there any resource to learn NX open, I have been really contemplating in learning the language so that I amy be able to create custom programs for a lot of the things we wish to do here.

cmacca: Are you suggesting one template with borders created for different size sheets but placed on separate layers so that when I work with a specific sized sheet I could just turn on the layers containing the borders and text set for that sheet size?
 
Yes that's what we do. Below is the code to set our A3 sheet visible. Note we place our borders on layers 254, 255 and 256.

Copy this code to notepad and save as A3.vb. Then run it in NX via Tools->Journal->Play.

You can modify the code and do a save as for other sheet sizes.

To test it just draw three lines each on the above layers and set the sheet size to something that is not A3.

To learn NX open go to Help->Documentation->Automation->NX Open->Open for .NET.

We use VB but you can use other languages.

The Tool->Journal->record is also a good place to start creating your own code.

Also the GTAC website has good examples of code, you need a webkey account.

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities

Module NXJournal
Sub Main()

Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work

Dim displayPart As Part = theSession.Parts.Display

' ----------------------------------------------
' Check if in Drafting
' ----------------------------------------------

Dim module_id As Integer = 0

ufs.UF.AskApplicationModule(module_id)
'Make sure you are in the drafting application
If module_id = UFConstants.UF_APP_DRAFTING Then
'Set undo point and name it "A3"
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "A3")

' ----------------------------------------------
' Menu: Format->Layer Settings...
' ----------------------------------------------
'Set work layer to layer 1
Dim stateArray3(0) As Layer.StateInfo
stateArray3(0).Layer = 1
stateArray3(0).State = Layer.State.WorkLayer
workPart.Layers.ChangeStates(stateArray3, False)

'Make sure layers 254, 255 and 256 are visible
Dim stateArray2(2) As Layer.StateInfo
stateArray2(0).Layer = 254
stateArray2(0).State = Layer.State.Visible
stateArray2(1).Layer = 255
stateArray2(1).State = Layer.State.Visible
stateArray2(2).Layer = 256
stateArray2(2).State = Layer.State.Visible
workPart.Layers.ChangeStates(stateArray2, False)

' ----------------------------------------------
' Menu: Format->Visible in View...
' ----------------------------------------------
' ----------------------------------------------
' Dialog Begin Visible Layers in View
' ----------------------------------------------
'Only show the layer border A3 is on
Dim stateArray1(255) As Layer.StateInfo
'Get existing layer settings
workPart.Layers.GetVisibilitiesInView(workPart.Views.WorkView, stateArray1)
'Change layer settings
stateArray1(253).Layer = 254
stateArray1(253).State = Layer.State.Hidden
stateArray1(254).Layer = 255
stateArray1(254).State = Layer.State.Hidden
stateArray1(255).Layer = 256
stateArray1(255).State = Layer.State.Visible

workPart.Layers.SetObjectsVisibilityOnLayer(workPart.Views.WorkView, stateArray1, True)

' ----------------------------------------------
' Menu: Edit->Sheet...
' ----------------------------------------------
'Set the new sheet size
Dim shtName As String = workPart.DrawingSheets().CurrentDrawingSheet.Name()

Dim drawingSheet1 As Drawings.DrawingSheet = CType(workPart.DrawingSheets.FindObject(shtName), Drawings.DrawingSheet)

Dim drawingSheetBuilder1 As Drawings.DrawingSheetBuilder
drawingSheetBuilder1 = workPart.DrawingSheets.DrawingSheetBuilder(drawingSheet1)

drawingSheetBuilder1.Option = Drawings.DrawingSheetBuilder.SheetOption.StandardSize

drawingSheetBuilder1.Height = 297.0

drawingSheetBuilder1.Length = 420.0

Dim nXObject1 As NXObject
nXObject1 = drawingSheetBuilder1.Commit()

drawingSheetBuilder1.Destroy()

End If

End Sub

Public Function GetUnloadOption(ByVal dummy As String) As Integer

Return Session.LibraryUnloadOption.Immediately

End Function

End Module


NX 7.0.1.7, TC 8.1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor