NX Journal アセンブリの子部品に対しての処理
アセンブリの子部品に対して処理したいときのプログラムを作成しました。コードは子部品のパートNo.を表示するものです。
VBコード
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main (ByVal args() As String)
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim child As Assemblies.Component
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open
For Each child In workPart.ComponentAssembly.RootComponent.GetChildren()
lw.WriteLine(child.GetStringAttribute("DB_PART_NO"))
Next
End Sub
End Module
記事の共有
関連記事
- NX Journal アプリケーションの変更
- NX Journal 図面を開く
- NX Journal Teamcenterが起動しているか判定
- NX Journal 環境の情報を取得
- Nx JournalでHello World