Scripting in SolidWorks
Scripting in SolidWorks
(OP)
Before I put some time aside to go through the tutorials, I'd like to know if the following is possible using the scripting API?
1) Create a part
2) Place Part in an assembly such that the centroid of that part is placed at a specific coordinate
3) Save & close part (there will be a lot of parts generated so I'm anticipating some memory issues)
4) Repeat until exit condition
5) Save assembly
If the above is in principle possible then I can justify the time out of regular shenanigans.
1) Create a part
2) Place Part in an assembly such that the centroid of that part is placed at a specific coordinate
3) Save & close part (there will be a lot of parts generated so I'm anticipating some memory issues)
4) Repeat until exit condition
5) Save assembly
If the above is in principle possible then I can justify the time out of regular shenanigans.






RE: Scripting in SolidWorks
Yes, this is possible with SolidWorks API (assuming that centroid == center of mass).
Take a look at the following methods:
http://help.solidworks.com/2015/english/api/sldwor...
http://help.solidworks.com/2013/English/api/sldwor...
http://help.solidworks.com/2013/English/api/sldwor...
http://help.solidworks.com/2011/English/api/sldwor...
Thanks,
Artem
RE: Scripting in SolidWorks