Hi all,
Is it possible to use a script to create a submodel in LDCad?
I ask this because I have to create multiple submodels that all require some basic other (LPub3D) metacommands and one or more parts, always in the same place.
This should be done by looping through a simple series of model names and descriptions.
I need to have submodels called A1, A2, A3, A4, .... A16
And B1, B2, B3 to B16 etc.
All the way to H.
Then I need submodels LA1, LA2, etc. to LH16
The A1, B1, etc. submodels should all have these lines:
Where in line 3 LA1.ldr is, of course, incremental like LA2, LA3, etc.
The LA1, LA2, etc. submodels should have more part lines in them and all start looking like this:
I was thinking about creating some sort of array that contains the names of the submodel files and then loop through to create all the submodels I need.
At least, that is my theory if I can use a script.
Or: can it be done another way?
Thanks all.
Is it possible to use a script to create a submodel in LDCad?
I ask this because I have to create multiple submodels that all require some basic other (LPub3D) metacommands and one or more parts, always in the same place.
This should be done by looping through a simple series of model names and descriptions.
I need to have submodels called A1, A2, A3, A4, .... A16
And B1, B2, B3 to B16 etc.
All the way to H.
Then I need submodels LA1, LA2, etc. to LH16
The A1, B1, etc. submodels should all have these lines:
Code:
0 ROTSTEP 90 180 0 ABS
0 !LPUB CALLOUT BEGIN
1 16 0 0 0 -0.5 0 0 0 0.5 0 0 0 -0.5 LA1.ldr
0 !LPUB CALLOUT END
0 !LPUB ASSEM MODEL_SCALE LOCAL 1.2500
0 !LPUB PLI BEGIN IGN
1 71 -150 0 150 1 0 0 0 1 0 0 0 1 91405.dat
0 !LPUB PLI END
Where in line 3 LA1.ldr is, of course, incremental like LA2, LA3, etc.
The LA1, LA2, etc. submodels should have more part lines in them and all start looking like this:
Code:
0 !LPUB ASSEM MODEL_SCALE LOCAL 0.3500
0 !LPUB PLI BEGIN IGN
[many part lines, all the same]
0 !LPUB PLI END
I was thinking about creating some sort of array that contains the names of the submodel files and then loop through to create all the submodels I need.
At least, that is my theory if I can use a script.
Or: can it be done another way?
Thanks all.
Jaco van der Molen
lpub.binarybricks.nl
lpub.binarybricks.nl