[LDCad] Use script to create submodel


RE: [LDCad] Use script to create submodel
#3
(2019-09-17, 21:49)Roland Melkert Wrote: Not directly, as it would need access to the internal file object (owner of all the subfile objects within a ldr/mpd) while currently there is only the ldc.subfile wrapper.

But you can (as of 1.6c) read/write any kind of file you want trough the lua io module.

You could use that to generate the ldraw content as nomal text (so without the ldc.subfile object etc).

Then load an existing file (if you want to append it to an existing model)
Add the new text and save the file again (i recommend using a different name though for backup purposes).

If you appended to a file currently open in LDCad it should trigger a reload in the editor once the script is done.

OK, I see.
So basically I'd only use LUA in LDCad. Or rather use LDCad to run a LUA script.
A bit like creating a BOM, like described in this thread?

Any hints as to how to achieve something like I'd want? Blush
Jaco van der Molen
lpub.binarybricks.nl
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: [LDCad] Use script to create submodel - by Jaco van der Molen - 2019-09-18, 12:20

Forum Jump:


Users browsing this thread: 1 Guest(s)