vitulaaak
Automotive
- Jul 5, 2007
- 70
I used this macro from mark to assign the part properties into drawing file...
option strict off
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
imports system.windows.forms
Module NXJournal
Dim thesession As Session = Session.GetSession()
sub Main
Dim thesession As Session = Session.GetSession()
Dim comp As ComponentAssembly = thesession.parts.work.ComponentAssembly
dim c as component = comp.rootcomponent
dim children as component() = c.getchildren
dim child as component
For Each child In children
dim prototype as part
if typeof child.prototype is part then
prototype = CTYPE(child.prototype,part)
messagebox.show(prototype.leaf)
end if
next
end sub
does anyone have an idea how to measure the weight of each component_? i am able to write a macro,that goes through all the components,but how to measure them???
thanks
vit
option strict off
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
imports system.windows.forms
Module NXJournal
Dim thesession As Session = Session.GetSession()
sub Main
Dim thesession As Session = Session.GetSession()
Dim comp As ComponentAssembly = thesession.parts.work.ComponentAssembly
dim c as component = comp.rootcomponent
dim children as component() = c.getchildren
dim child as component
For Each child In children
dim prototype as part
if typeof child.prototype is part then
prototype = CTYPE(child.prototype,part)
messagebox.show(prototype.leaf)
end if
next
end sub
does anyone have an idea how to measure the weight of each component_? i am able to write a macro,that goes through all the components,but how to measure them???
thanks
vit