Hi friends ,
Recently I want to create an automatic layout operation (in ISight platform) for some cubes (E.g. 20 solid small cubes - that quantity of these small boxes is defined by end user as input data and we called them "sub-cube" ) in extruded cut cube (like empty box - that we called it "main-cube" ) and stick all sub-cubes on each 6 side of main cube ... something like Fig-1.
Fig-1
For doing this operation in my project I must give some input data from end user (as excel file) for quantity of sub-cubes and dimensions of them and size of the main-cube and also initialize guess for positioning of these sub-cubes (E.g X,Y,Z for Center of Gravity of them or ...) on interior panels of main-cube and then change location of them in a Loop (E.g with Evolutionary Algorithm or ....) and this operation goes on about 2000 time or more until found best layout (it means I create 2000 assembly file and keep them) . Fig-2
Fig-2
So I search in forum and found some concepts for doing this job :
1) using some third party software like Driveworks ( using extra software is not considering in my plan)
2) using Design Table ( Failed I think ! impossible locating parts in assembly file with design table )
3) using some export/import method like XML or else and middle of this transaction editing the position and ...
4) using API / Macro method something like using c# and capturing jobs as macro in solidworks and then put the code in c# source code .
5) ...
So this question still remain that which way is the best solution for doing this operation and therefor I Ask u guys to consultant me in this situation and guide me for the best and simplest and also fastest way .
I appreciate u that spending your time for reading this discussion... Here is what I think about best Scenario :
First Step - creating Small Cubes (sub-cubes) :
using API/Macro (c#) draw first sub-cube and for example create 19 remain cubes with Design Table feature . So at last I have a part with 20 configs that when I want to create my assembly file (like above fig) I called them with different configs . and also one extruded cut cube for main-cube . At last I have 2 parts .
Second Step - Create Assembly file :
Then in c# and with API/Macro I create assembly file with these parts that created in first step and I don't know some how ( I think this is not easy as I say here ) locating theme with API/Macro .
Third Step - Change in position of Small Cubes (sub-cubes) :
Then every time the loop in iSight software called SolidWork it will use reference assembly file that created in step-2 and just like before using c# , API/Macro change X,Y,Z of small cube and operation goes on ...
so if I wrong please correct my Scenario ...