Jump to content

[Discuss] Scripting Sandbox (RCF Plugin)


Recommended Posts

I wonder who clicked green "+" without even downloading the code... (download counter is still 0).

Anyway, whoever did it, thank you :)

It maybe because the person first downloaded it from NI community and then rated it here on LAVA... just a wild guess ;)

The RCF Plugin is really cool vugie!

One thing that bugs me a little though is that when I create a new plugin by using the context menu option "New Sandbox VI" the VI generated is in the JKI.LV.Extentions context and therefore not savable... wouldn't it be easier to place the new plugin in the main application context?

I guess it is possible to choose the context in which you create a VI, but I was wandering how do you create your own context programmatically?

Link to comment

One thing that bugs me a little though is that when I create a new plugin by using the context menu option "New Sandbox VI" the VI generated is in the JKI.LV.Extentions context and therefore not savable... wouldn't it be easier to place the new plugin in the main application context?

I guess it is possible to choose the context in which you create a VI, but I was wandering how do you create your own context programmatically?

Strange, I have no problems with saving VIs created that way. I have never dive deep into context related issues. I remember that there were some problems with RCF's context.

Any suggestions what should I wire to Application input of "New VI" block? Now there is a This Application constant.

Link to comment

Strange, I have no problems with saving VIs created that way. I have never dive deep into context related issues. I remember that there were some problems with RCF's context.

Any suggestions what should I wire to Application input of "New VI" block? Now there is a This Application constant.

Hmmm... this is weird indeed, I have only tried in LV 8.6 and I can't save the new sandbox VI...

I think the best way is to use the "main application context" because my experience is that working into other "hidden" context creates problems (like the VI is not runable but you can't have the error list, etc...) I'm not sure what's the best way to get this context's ref though...

Here's my first sandbox plugin "Horizontal align and distribute nodes" (saved in LV 8.6) it's quick and dirty but I'm happy with it and it took me about 10 minutes to make it... If I had tried to make a proper RCF for that I would have given up before the end.

And this is why the scripting sandbox is really cool! great job :thumbup1:

Horizontal align and distribute.vi

Link to comment

Will the default app instance work?

You can pull an app instance from a VI ref, but from inside the RCF I expect it would return the JKI.LV.Extensions context.

Thanks, asbo.

Antoine, try to replace following VI: [fix is now integrated in latest build]

However in my environment plugin VIs report to work in Main Application Instance...

Link to comment
  • 3 weeks later...

The Dialog Express VI has a start path.

I didn't explain it well...

From the start. Sandbox has defined "scripts" directory which is scanned to find installed scripts (by script I mean a VI where Active VI data is passed to). There is "New Sandbox VI" option which automatically creates new script from the template. It is a new unsaved VI, just like after clicking vit file. After creating the script you want to save it, but by default save dialog starts at directory of previously saved VI (or sth like this). So you have to remember where your scripts directory is and search for it. It may be a pain when it is located somewhere deep, so it is in conflict with "quick&dirty" paradigm of Scripting Sandbox.

Summarizing, I'm programatically creating new VI for edit and I want to have specified directory in save dialog when user presses Ctrl-S

Link to comment

I didn't explain it well...

From the start. Sandbox has defined "scripts" directory which is scanned to find installed scripts (by script I mean a VI where Active VI data is passed to). There is "New Sandbox VI" option which automatically creates new script from the template. It is a new unsaved VI, just like after clicking vit file. After creating the script you want to save it, but by default save dialog starts at directory of previously saved VI (or sth like this). So you have to remember where your scripts directory is and search for it. It may be a pain when it is located somewhere deep, so it is in conflict with "quick&dirty" paradigm of Scripting Sandbox.

Summarizing, I'm programatically creating new VI for edit and I want to have specified directory in save dialog when user presses Ctrl-S

IC (I think tongue.gif)

If you don't mind being platform dependent then you can use the windows SetCurrentDirectory function (LV example here). But your scripting thingy would still have to be running after they decided to save it. Other than that, I only think if saving a dummy VI after they have saved theirs (again your thingy needs to be running to monitor the memory list).

But if your going the platform specific route I would suggest adding it to the places bar so they can always find it easily.

Link to comment
  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.