Sorry cowski, what I was meaning, was that in order to run the journal I would need to count up all the bodies that I wish to export into the temp part before running the journal.
Then I would enter the number of bodies and run the journal (4 bodies for example below)...
Awesome work cowski!
It no longer throws errors.
However, when multiple bodies are selected, it only exports the first body selected, and fails to export the other bodies that were selected.
:)
Again, thank you for your help. Im sure it is close to working now.
I currently get a "casting" runtime error:
Runtime error:
System.InvalidCastException: Unable to cast object of type 'NXOpen.TaggedObject[]' to type 'NXOpen.Body[]'.
at NXJournal.Main() in...
How can I modify this journal, to select multipe bodies to export to a temp part, as opposed it just selecting one body to export?
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Module NXJournal
Sub Main
Dim theSession As Session =...
I now have this working by:
Dim selectionMask_array(1) As Selection.MaskTriple
With selectionMask_array(0)
.Type = UFConstants.UF_solid_type
.Subtype = 0
.SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_SOLID_BODY
End With...
Trying to create a journal to edit object display (chabge colour to a preset value) of any pre-selected solid bodies.
I have tried the below, but I still have to select "solid body" from the selection filters for it to work.
Any help greatly appreciated.
Option Strict Off
Imports System...