claforet
Mechanical
- Apr 8, 2010
- 54
Hi,
I'm trying to get the bounding box around a part (or component, I've tried both) with the following code:
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpen.UF
Imports System.IO
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
dim tggg as tag = workpart.tag
dim b(5) as double
ufs.modl.askboundingbox(tggg,b)
end sub
end module
When I run the code (I've tried single parts and assemblies) I get a memeory access violation saying that it attempted to read or write protected memory. Does anyone know what can be done to fix this?
Thanks.
I'm trying to get the bounding box around a part (or component, I've tried both) with the following code:
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpen.UF
Imports System.IO
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
dim tggg as tag = workpart.tag
dim b(5) as double
ufs.modl.askboundingbox(tggg,b)
end sub
end module
When I run the code (I've tried single parts and assemblies) I get a memeory access violation saying that it attempted to read or write protected memory. Does anyone know what can be done to fix this?
Thanks.