CR98
Mechanical
- Jul 15, 2018
- 5
Hello,
I'm currently trying to populate a blank part tree, with the information coming from an excel sheet that lists indenture numbers, part number, part name, etc. I'm doing this by writing 2 loops of code in a journal (using VBA) to create either an assembly component or a part component based on indenture, then the 2nd will go back and organize the parts (make children of parent part/assembly). Currently, there's 2 issues I've run into, hoping to get some feedback.
1. Multiple parts with same part number: I need to make multiple parts with same number (i.e. 4 washers) however, NX will create one then throw the error "file already exists" I imagine an error handler of " if file exists, copy/paste/unpack would fix this, but without it being a recordable action, I'm at a loss for the syntax.
2. Drag/Drop components: I have the logic for how to find a components parent and recorded a journal of drag/drop action, however I cannot use a string to reference a component name (i.e. component name = excel.workbook.worksheet.range.value) is there a way to convert this string to a name NX can read?
I can post my code in the future if that helps, but these issues seemed independent of the code.
Using NX10, without TeamCenter
Thanks
I'm currently trying to populate a blank part tree, with the information coming from an excel sheet that lists indenture numbers, part number, part name, etc. I'm doing this by writing 2 loops of code in a journal (using VBA) to create either an assembly component or a part component based on indenture, then the 2nd will go back and organize the parts (make children of parent part/assembly). Currently, there's 2 issues I've run into, hoping to get some feedback.
1. Multiple parts with same part number: I need to make multiple parts with same number (i.e. 4 washers) however, NX will create one then throw the error "file already exists" I imagine an error handler of " if file exists, copy/paste/unpack would fix this, but without it being a recordable action, I'm at a loss for the syntax.
2. Drag/Drop components: I have the logic for how to find a components parent and recorded a journal of drag/drop action, however I cannot use a string to reference a component name (i.e. component name = excel.workbook.worksheet.range.value) is there a way to convert this string to a name NX can read?
I can post my code in the future if that helps, but these issues seemed independent of the code.
Using NX10, without TeamCenter
Thanks