View Full Version : invoke tool with specific options?

12-10-2011, 03:06 PM
Is it possible to use LScript (or python) to solely invoke a tool with specific options/parameters set? And leave the application in that state?

12-10-2011, 10:51 PM
Not sure about setting parameters (which would probably have to be using the comring) but invoking tools should be doable depending on the tool. What do you mean by leaving application in that state?

12-10-2011, 11:59 PM
That the tool stay engaged when the LScript exits, and the app doesn't revert to its state before the Lscript executed.

Basically, I"m looking for a way to implement Tool Presets.

12-12-2011, 10:13 AM
As far as I know, that is not doable with Lscript in most of LW tools. Using the comring to set variables inside of plugins could work for some layout plugins, but unless they were setup with comring functionality when they were created I do not think there is a way to access them. I am sure if there was a way to implement a presets system with tools, they would have been implemented already and probably not through lscript.

12-12-2011, 11:06 AM
I am sure if there was a way to implement a presets system with tools, they would have been implemented already......
Yeahhhhh, I never believe that construction: it took them a while just to add a "Save All Objects" function (admittedly, that's going a ways back, but still) so the idea that all Good and Possible functions are either already implemented or impossible is, to say the least, fallacious.

It certainly may be true in THIS case, of course. I'm going to have to get up to speed on the comring, it keeps popping up.

Of course, the question got kicked down the road a bit with Python: was Python only added to Layout, or to Modeler too.

12-12-2011, 11:56 AM
What I meant by my statement is that if presets were an after thought then you are SOL with that tool, but some tools have preset functionality such as multishift and bandsaw pro. I did not mean they would have created presets for every tool as I am sure it is possible for them but it wouldn't be a priority for their programmers at this point.

12-12-2011, 01:59 PM
Oh, I don't want them to create presets: I just want a preset system. Each user could make their own presets.

So, on exit from an LScript is Modeler left in the same state in which it entered the Lscript?