potrero
Mechanical
- Aug 30, 2007
- 516
NX8.0.3 Win7x64
User cowski provided some great VB journals in this old thread: thread561-323165, which allow the setting of bounding box dimensions as Part Attributes. One of the journals he provided allows a user to select their own coordinate system in order to align the bounding box to a part which may not be aligned with the absolute coordinate system. I'm attaching links (provided originally by cowski) to this script (Bounding_box_select_csys.vb) as well as a related simpler script which doesn't allow selection of an arbitrary csys but rather defaults to using the absolute csys (bounding_dims.vb). I'm trying to figure out how to modify the csys-selectable journal as follows:
It'd be great if the code defaulted to selection of the absolute coordinate system, if no specific CSYS was selected or named, but the "OK" button was clicked. If the CSYS selection dialogue box was Canceled, then the function would exit without writing any values (this is the default behavior for the simpler script, even if the OK button is clicked but no csys is selected)
I've tried but can't figure out how to do this. Would appreciate any help!
On a related note, does the absolute CSYS in NX have a Name? And by this I mean even in a part which does not have an actual CSYS "Feature" in the Feature Navigator -- all parts have the concept of Absolute and Work CSYS's, but what are their names -- ie to type into the dialogue box in cowski's code?
User cowski provided some great VB journals in this old thread: thread561-323165, which allow the setting of bounding box dimensions as Part Attributes. One of the journals he provided allows a user to select their own coordinate system in order to align the bounding box to a part which may not be aligned with the absolute coordinate system. I'm attaching links (provided originally by cowski) to this script (Bounding_box_select_csys.vb) as well as a related simpler script which doesn't allow selection of an arbitrary csys but rather defaults to using the absolute csys (bounding_dims.vb). I'm trying to figure out how to modify the csys-selectable journal as follows:
It'd be great if the code defaulted to selection of the absolute coordinate system, if no specific CSYS was selected or named, but the "OK" button was clicked. If the CSYS selection dialogue box was Canceled, then the function would exit without writing any values (this is the default behavior for the simpler script, even if the OK button is clicked but no csys is selected)
I've tried but can't figure out how to do this. Would appreciate any help!
On a related note, does the absolute CSYS in NX have a Name? And by this I mean even in a part which does not have an actual CSYS "Feature" in the Feature Navigator -- all parts have the concept of Absolute and Work CSYS's, but what are their names -- ie to type into the dialogue box in cowski's code?