Some structural chnages:
why do you do the same thing over and over again?
select -r Base_0_7223;
rotate -r -os 0 0 0
is ateh same thing as manipulating:
select -r Base_0_7223_ATR ;
Also dont sue select like this ist just slows you down by 50% atleast.
Ainstad pass teh commands selection lists in forms of names for example instead of
select -r BlockAttributes ;
duplicate -rr -renameChildren BlockAttributes; scale -r 48 18 4.75; rotate -r 0 0 0; move -r 24 -6 2.375;
rename |BlockAttributes1|Block1 "Base_0_7223" ;
rename |BlockAttributes1 "Base_0_7223_ATR" ;
do:
$this=duplicate -rr -n "Base\_0\_7223\_ATR" BlockAttributes
;
xform -r -s 48 18 4.75 -ro 0 0 0 -t 24 -6 2.375 $this;
now to do the thing better proper youd do:
//Product Number -Base_0_7223
//Product Type -BASE
$this=duplicate-n "Base\_0\_7223\_ATR" BlockAttributes
;
xform -r -s 48 18 4.75 -ro 0 0 0 -t 24 -6 2.375 $this;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 $this;
xform -rp 0 0 0 -sp 0 0 0 $this;
sets -e -forceElement Fixture_ShelfGroup $this;
xform -r -os -ro 0 0 0 -t 2883.053563 1559.536442 0;
parent $this Fix_70701016_PLN_Section4_7222;
im omitting reneaming teh damn child, itt just slows things down unnecceserily. But you could do that. Now since you repeat this a lot you shoudl functionize it.
proc makeAPlacedBlock(string $name, string $sgName,
float $preXform[], float $postXform[])
{
$this=`duplicate-n $name BlockAttributes`;
xform -r -s $preXform[0] $preXform[1] $preXform[2]
-ro $preXform[3] $preXform[4] $preXform[5]
-t $preXform[6] $preXform[7] $preXform[8] $this;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 $this;
xform -rp 0 0 0 -sp 0 0 0 $this;
sets -e -forceElement $sgName $this;
xform -r -os -ro $postXform[0] $postXform[1] $postXform[2] -t $postXform[3] $postXform[4] $postXform[5];
}
Now you can do:
//Product Number -Fix_70701016_PLN_Section4_7222
//Product Type -FIXTURE
makeAPlacedBlock("Fix_70701016_PLN_Section4_7222","Fixture_ShelfGroup"
[8, 22, 0.001, 0, 0, 0, 24, -11, 0.0005],[0, 0, 0, 2883.053563, 1559.536442, 0]);
//Product Number -Base_0_7223
//Product Type -BASE
makeAPlacedBlock("Base_0_7223","Fixture_BaseGroup"
[48, 18, 4.75, 0, 0, 0, 24, -6, 2.375],[0, 0, 0, 2883.053563, 1559.536442 ,0]);
parent Base_0_7223 Fix_70701016_PLN_Section4_7222;
Then put this in a foor loop and so on. should get saner to work with.
yada yada.