Script to add parameters/relations for every part in assembly
Hello,
Maybe someone know where I could find information about ways to solve problem like that? Any hints on where to start would be helpful, since I have close to no scripting experience with Creo.
In my work I make assemblies of various parts and later need to do drawings with BoM's, to do that I need to fill up table in parameters with part number, name and usage, I found its easier to copy that information in relations from spreadsheet that adds variable names which I'm doing at the moment, however, in bigger assemblies (20-40 parts, sometimes even bigger then that) doing that to every part takes tremendous amount of time, which decreases productivity by a lot.
To achieve a task, I have some things that might help.
- Every part's name starts with it's number, which is also copy'able into relations. For example part's name is (123456 XXXX-YYY-BB-CCC-D, then text that I need to copy into it (name is needed only to know where I need to copy relations into) would be something like
| number='123456' |
| type_bom='XXXX-YYY-BB-CCC-D' |
| name_bom='Example name' |
qtybom='' |
2. I get my data that I need to copy in excel spreadsheet where for example 2-6 column is always for first part, 7-11 for second and so on.
I have idea's how to take text from spreadsheet and use it to copy, but part where I need to script to choose file/actualy copy it gives me tons of problems, the best thing that I managed to reach was a mapkey that opens relations and after you copy your text into it it saves and closes part.
Any help would be helpful, thanks in advance.


.