[LDCad] Use script to create submodel


RE: [LDCad] Use script to create submodel
#2
(2019-09-16, 19:15)Jaco van der Molen Wrote: Is it possible to use a script to create a submodel in LDCad?

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.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: [LDCad] Use script to create submodel - by Roland Melkert - 2019-09-17, 21:49

Forum Jump:


Users browsing this thread: 3 Guest(s)