Jump to content
vugie

[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 :)

Share this post


Link to post
Share on other sites

Wasn't me, but I've seen descriptions that were cool enough in themselves to warrant a rep point.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I'm not sure what's the best way to get this context's ref though...

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.

post-13461-0-16987400-1291737529_thumb.p

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

Thanks, asbo.

Antoine, try to replace following VI: LINK (what &^%$ is with uploading?!)

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

cool, works great !

Share this post


Link to post
Share on other sites

cool, works great !

Good. I integrated the fix in new build.

Share this post


Link to post
Share on other sites

I added documentation for script template (as BD comments).

Does anyone know how to set default directory for save dialog? Just for convenience when creating new script - dialog would automatically point to scripts directory.

Share this post


Link to post
Share on other sites

I added documentation for script template (as BD comments).

Does anyone know how to set default directory for save dialog? Just for convenience when creating new script - dialog would automatically point to scripts directory.

The Dialog Express VI has a start path.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.