LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our VI Scripting Code Repository Files and visit the LabVIEW Wiki VI Scripting article


Tags
(This content has not been tagged yet)
3 Pages V   1 2 3 >  
Reply to this topic Start new topic
> [CR] Scripting Tools.zip
Gavin Burnell
post Jun 7 2007, 01:00 PM
Post #1


Very Active
***

Premium Member
Posts: 119
Joined: 21-January 06
From: Leeds, UK
Member No.: 3951
Using LabVIEW Since:1994
LV:8.5.1 ,8.6 ,8.2.1
United Kingdom uk_yorkshire Nothing Selected



File Name: Scripting Tools.zip
File Submitter: Gavin Burnell
File Submitted: 24 May 2007
File Updated: 7 Nov 2008
File Category: VI Scripting
File Version: 0.18.01
LabVIEW Version: 8.5.x
License: The BSD License

Scripting Tools.zip 0.18.01
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copyright © 2007, University of Leeds, UK
All rights reserved.

Author:
Gavin Burnell
G.Burnell@leeds.ac.uk

Distribution:
This code was downloaded from the LAVA Code Repository: http://forums.lavag.org/downloads.html

Description:

This is a LabVIEW 8.2 Library of VIs to help with scripting.

The public VIs include routines to get hold of the block diagram references, control terminal references, get the

connector pane reference and select the connector pane pattern and wire controls up to it. There are a number of

routines to help wire the block diagram up, including creating a selection of the primitives (I got bored of coding

them all up !).

I've stuck in some routines that work with tags - hidden away is the capability to tag LabVIEW vi-server objects

with arbitary data. One possibility is to use this to identify bits of the block diagram of a vi for moving and

rewiring via scripting.

NB If you are installing this with the Array XNodes (also from the Code repository) then I strongly recommend

unzipping the two files into the same common directory and preserving the names. That should help linkage problems.


Dependancies:

Support:
If you have any problems with this code or want to suggest features:
http://forums.lavag.org/CR-Scripting-Toolszip-t8399.html

Change Log:
0.18.01 Repackage for LabVIEW 8.5.1
Change Create Free Text Label to polymorphic and add a polymorph for creating labels on block diagrams
0.17.01 Adds another routine for XNode support to get the terminal descriptor from a vi reference.
0.16.02 Update .opgb file to allow the library to be built as an OpenG package file for install via VIPM
0.16.01 Minor bug fixes, added a routine to convert a ref to an enum describing its class, reworked find all objects
to get the selector tunnel of a case structure too. Added a number of routines to the XNode Support
sub-library.
0.15.01 Added new routines to tidy up wires and delete LabVIEW objects.
Added a new example that will take a selected case structure without a wire selector, looks for
an error cluster wire that tunnels in and out, deletes the in tunnel and wires it to the selector
instead. This is for those situations when you realise you should have wrapped your vi in an error
case structure... !
0.14.02 Fixed the cleanup wiring example by adding a routine to return references for wires specifically.
0.14.01 Added a routine to create a free text label on a vi front panel.
0.13.02 Added routines to create constants and controls/indicators from aribtary variant data. Reorganised some
of the tagging support vi's out of private scope and renamed the misspelt private directory. Added a couple
more examples - one is a tool to set tags on selected elements for doing template based scripting and the
other is a complete (although sparse) XNode that will test whether a single LVObject references, or an array
of LVObject references can be cast to a specific type of reference. (Think about getting all objects in a
diagram and then filtering for those that are decorations, or sub-bi nodes or...). The Generate Code ability
vi of this XNode demonstrates how to use a template vi with tagging to minise the hassle of generating code
for XNodes.

This release is in OpenG Package format
0.12.01 Added a few new routines, one to expand a shift register, one to deterine if an object is selected,
and a polymorphic vi that returns a reference of any given LVObject class (essentially wrapping
class specifier constants for all possible class types). Also added a couple of examples, including
one that will do a clean up wire operation on all selected wires or all wires in the structure.
0.11.01 Wrapped all vis in a case structure wired to error in for error handling
added a get sub-vi nodes in heirarchy and get all sub-vis routines
tried to find and fix the worst wiring excesses
0.10.04 Updated the README
0.10.03 fixed a bug with the creation of (un)bundle by name nodes.
0.10.02 fixes a couple of bugs, and adds some create bundle/unbundle node functions.
0.10.01 Original release

License:

Copyright © 2007, University of Leeds

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the

following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the

following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the

following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the University of Leeds nor the names of its contributors may be used to endorse or

promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Click here to download this file

--------------------
Gavin Burnell
Lecturer and EPSRC Advanced Research Fellow
School Physics and Astronomy
University of Leeds, UK.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jun 7 2007, 01:00 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Yair
post Jun 7 2007, 05:56 PM
Post #2


Extwemely Active
*****

Premium Member
Posts: 1621
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


Nice.

thumbup1.gif

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
ohiofudu
post Jun 7 2007, 11:09 PM
Post #3


More Active
**

Member
Posts: 45
Joined: 24-August 05
From: Stuttgart Germany
Member No.: 2816
Using LabVIEW Since:2004
LV:8.0 ,7.1.1 ,6.1
Germany Nigeria Nothing Selected


Hi Burnell,

Nice job thumbup1.gif
Could you Please post Examples on how to use these tools(Vis) I have not being able to use some of the vi.

Thanks

Ohiofudu

--------------------
Ohiofudu Israel



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Gavin Burnell
post Jun 11 2007, 03:15 PM
Post #4


Very Active
***

Premium Member
Posts: 119
Joined: 21-January 06
From: Leeds, UK
Member No.: 3951
Using LabVIEW Since:1994
LV:8.5.1 ,8.6 ,8.2.1
United Kingdom uk_yorkshire Nothing Selected


QUOTE (ohiofudu @ Jun 8 2007, 12:09 AM) *
Hi Burnell,

Nice job thumbup1.gif
Could you Please post Examples on how to use these tools(Vis) I have not being able to use some of the vi.

Thanks

Ohiofudu


I've just posted a new version which has a couple of examples, adds some more features, and fixes a couple of minor bugs.

--------------------
Gavin Burnell
Lecturer and EPSRC Advanced Research Fellow
School Physics and Astronomy
University of Leeds, UK.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Mike Ashe
post Jun 11 2007, 08:01 PM
Post #5


Instant Human, just add coffee
****

Premium Member
Posts: 889
Joined: 31-January 03
From: Waterford, CT USA
Member No.: 45
Using LabVIEW Since:1992
LV:8.2.1 ,7.1 ,8.0.1
United States us_connecticut us_washington


Nice tool(s) Gavin!

Just a very minor nit, your subdirectory \Prviate should be \Private

Great idea to create the examples, now perhaps to add a few more complex ones. Do you take donations?
(Of examples, I mean)

One other thought, you also posted your Scripting Tools here in this thread.
Perhaps you might consider splitting the Scripting Tools out of that and including a link to the CR version to make sure someone doesn't get confused or maybe just edit the post to add a link to your CR version so they know that updated versions are available. In any event, great work.

--------------------
*************************************************************
"Always listen to the experts, they'll tell you what can't be done, and why.
Then go do it."
~The Notebooks of Lazarus Long (by Robert Heinlein)
*************************************************************


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Gavin Burnell
post Jun 11 2007, 08:41 PM
Post #6


Very Active
***

Premium Member
Posts: 119
Joined: 21-January 06
From: Leeds, UK
Member No.: 3951
Using LabVIEW Since:1994
LV:8.5.1 ,8.6 ,8.2.1
United Kingdom uk_yorkshire Nothing Selected


QUOTE (Mike Ashe @ Jun 11 2007, 09:01 PM) *
Just a very minor nit, your subdirectory \Prviate should be \Private


Er, yes. I do a lot of coding whilst travelling on the train, which means sometimes my typing isn't as accurate as it should be... will fix that next time.

QUOTE (Mike Ashe @ Jun 11 2007, 09:01 PM) *
Great idea to create the examples, now perhaps to add a few more complex ones. Do you take donations?
(Of examples, I mean)


I'll happily include any donated examples or indeed bug fixes, new functions, whatever (day job time permitting of course wink.gif ) !

QUOTE (Mike Ashe @ Jun 11 2007, 09:01 PM) *
One other thought, you also posted your Scripting Tools here in this thread.
Perhaps you might consider splitting the Scripting Tools out of that and including a link to the CR version to make sure someone doesn't get confused or maybe just edit the post to add a link to your CR version so they know that updated versions are available. In any event, great work.


Hmmm, I don't seem to be able to edit my posts in that thread any longer. At the time I posted that version, the tools were in code-repository purdah -that version worked well enough for the XNodes but had several bugs in them and I'd replace it if I could...

--------------------
Gavin Burnell
Lecturer and EPSRC Advanced Research Fellow
School Physics and Astronomy
University of Leeds, UK.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
ohiofudu
post Jun 11 2007, 08:50 PM
Post #7


More Active
**

Member
Posts: 45
Joined: 24-August 05
From: Stuttgart Germany
Member No.: 2816
Using LabVIEW Since:2004
LV:8.0 ,7.1.1 ,6.1
Germany Nigeria Nothing Selected


QUOTE (Gavin Burnell @ Jun 11 2007, 10:15 AM) *
I've just posted a new version which has a couple of examples, adds some more features, and fixes a couple of minor bugs.


Hi Gavin,

Thanks for the Examples Great Job.

--------------------
Ohiofudu Israel



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Jun 12 2007, 02:21 AM
Post #8


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2363
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


QUOTE (Gavin Burnell @ Jun 11 2007, 01:41 PM) *
Hmmm, I don't seem to be able to edit my posts in that thread any longer. At the time I posted that version, the tools were in code-repository purdah -that version worked well enough for the XNodes but had several bugs in them and I'd replace it if I could...
I've edited the post to include a link to the CR file. FYI, this is a perfect use case for using the "report post to moderator" button. Click on that button and describe what you want me to do and I will do it.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rolfk
post Jun 12 2007, 07:51 AM
Post #9


<customize this text>
*****

Premium Member
Posts: 1001
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (Michael_Aivaliotis @ Jun 11 2007, 09:21 PM) *
I've edited the post to include a link to the CR file. FYI, this is a perfect use case for using the "report post to moderator" button. Click on that button and describe what you want me to do and I will do it.


Or one could get a premium membership. wink.gif Allows you to edit posts even months later.

Rolf Kalbermatter


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Jun 12 2007, 04:21 PM
Post #10


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2363
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


QUOTE (rolfk @ Jun 12 2007, 12:51 AM) *
Or one could get a premium membership. wink.gif Allows you to edit posts even months later.
I couldn't have said it better myself!

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Gavin Burnell
post Jun 12 2007, 09:27 PM
Post #11


Very Active
***

Premium Member
Posts: 119
Joined: 21-January 06
From: Leeds, UK
Member No.: 3951
Using LabVIEW Since:1994
LV:8.5.1 ,8.6 ,8.2.1
United Kingdom uk_yorkshire Nothing Selected


QUOTE (rolfk @ Jun 12 2007, 08:51 AM) *
Or one could get a premium membership. wink.gif Allows you to edit posts even months later.

Rolf Kalbermatter


Ok, in future I'll be able to do that myself yes.gif

In the meantime, have another incremental update. I've included an example of using the scripting tools in an XNode, because you can't build zip files with XNodes in them via the LabVIEW project window, I've switched to packaging as an OpenG Package format. I've subsequently realised that I've packaged up some cruft as well oops.gif

--------------------
Gavin Burnell
Lecturer and EPSRC Advanced Research Fellow
School Physics and Astronomy
University of Leeds, UK.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Mike Ashe
post Jun 13 2007, 01:21 PM
Post #12


Instant Human, just add coffee
****

Premium Member
Posts: 889
Joined: 31-January 03
From: Waterford, CT USA
Member No.: 45
Using LabVIEW Since:1992
LV:8.2.1 ,7.1 ,8.0.1
United States us_connecticut us_washington


QUOTE (Gavin Burnell @ Jun 12 2007, 05:27 PM) *
In the meantime, ... I've switched to packaging as an OpenG Package format.

Are you going to submitt this to be a package available to VIPM any time soon? I think it would be a great addition.

--------------------
*************************************************************
"Always listen to the experts, they'll tell you what can't be done, and why.
Then go do it."
~The Notebooks of Lazarus Long (by Robert Heinlein)
*************************************************************


Tags
(This content has not been tagged yet)
Go to the top of the page