Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

NX symbols referrence in Journal

Status
Not open for further replies.

Altojoe

New member
Mar 16, 2013
23
0
0
IN
How to ref the symbols in journal


i created one journal to move all the symbols to layer 254 as following. but it is showing an error symbol is not a part of NXOPEN.Annotations.AnnotationManager


I dont know how it will read in jornal for symbols i want all the subtypes needs to be selected in this method. like crosshatch, id symbols, centerlines etc.

When i do only for centerlines or id symbols i am getting the action. But not for all.....


Option Strict Off
Imports System
Imports NXOpen
Imports System.Collections.Generic

Module NXJournal
Sub Main

Dim theSession As Session = Session.GetSession()
Dim workpart As Part = theSession.Parts.Display
Dim hatch1 As Annotations.Hatch

Const SymLayer as Integer = 254

[highlight #FCE94F]For each CrosshatchObj as DisplayableObject In workpart.Annotations.symbols[/highlight]
'if typeof(CrosshatchObj) is Crosshatch then
CrosshatchObj.Layer = CrosshatchLayer
CrosshatchObj.RedisplayObject
'end if
next
End Sub
End Module
 
Replies continue below

Recommended for you

There is no master collection that references all the symbols; each symbol type has its own collection, such as:
[ul]
[li]workpart.Annotations.IdSymbols[/li]
[li]workpart.Annotations.Hatches[/li]
[li]workpart.Annotations.Centerlines[/li]
[/ul]

etc, etc.

www.nxjournaling.com
 
Thanks Cowski.. Can you please give the required names for this list like .Idsymbols


GD&T Symbols
Surface Finish
Intersection
Target Point
Offset Center Point
Userdefined symbols
Area fill
DMV Faceted Representation
Dim by parts
label on parent

So that I can able to extend the journal to select all individually.
 
Option Strict Off
Imports System
Imports NXOpen
Imports System.Collections.Generic

Module NXJournal
Sub Main

Dim theSession As Session = Session.GetSession()
Dim workpart As Part = theSession.Parts.Display

Const SymbolsLayer as Integer = 254

For each SymbolsObj as DisplayableObject In workPart.Annotations.Idsymbols
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.centerlines
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.intersectionSymbols
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.customSymbols
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.targetPoints
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.hatches
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
For each SymbolsObj as DisplayableObject In workPart.Annotations.draftingSurfaceFinishSymbols
SymbolsObj.Layer = SymbolsLayer
SymbolsObj.RedisplayObject
next
End Sub
End Module
 
Status
Not open for further replies.
Back
Top