Jump to content

[CR] Insert Type Conversion RCF Plugin


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=85

Name: Insert Type Conversion RCF Plugin

Submitter: François Normandin

Submitted: 21 Jul 2009

File Updated: 03 Jan 2011

Category: JKI Right-Click Framework Plugins

LabVIEW Version: 8.2

License Type: BSD (Most common)

Insert Conversion Node RCF Plugin v1.2.0.7

Copyright © 2009-2010, François Normandin

All rights reserved.

*Plugin*

Name=Insert TypeConversion

Summary=Inserts a type conversion automatically

Description=Will insert type conversion for all strings, numbers, paths, variants & enums to the right datatype.

Copyright=Copyright © 2009-2010 François Normandin

License=BSD

Developer=François Normandin

Version=1.2.0.3

*Plugin*

Author:François Normandin

Contact Info: Contact via PM on www.lavag.org

LabVIEW Versions:

Created and tested with LabVIEW 8.2

Tested with 8.6 and 2009.

Dependencies:

jki_tool_right_click_framework >= 1.0.2.208

oglib_array >= 3.0.0

oglib_lvdata >= 2.9

Description:

This package contains a plugin for the Right-Click Framework of JKI.

It consists of a first draft of a tool to automatically insert correct conversion node on a wire (or multiple wire at once).

Includes:

- Decimal String to Number.

- Float String to Number.

- Any numeric type (int, unint, floats, complex) to any numeric type.

- Variant to string or numerics.

- Numerics to Variant.

- String to Variant.

- Path to String.

- String to Path.

- Boolean to string.

- Enum to String.

- String to Enum.

- Numeric to Enum.

- Numeric to String

- Unbundle cluster to terminal indicator.

Instructions:

After installing package with VIPM, restart the RCF framework. Use the right-click on wires to automatically insert a conversion node if needed.

** VIPM 2010 or higher is required to process this package.

Known Issues:

1- Not all typecasts are implemented.

2- Wires with joints will not behave correctly yet.

Acknowledgements:

JKI for providing with this great framework.

Change Log:

v1.0.0: Initial release of the code.

v1.0.2: Added _rcf_ in package name.

v1.0.3: Changed the typecast name for proper "type conversion" name.

v1.0.9: Added readme file into .vip file package + some VI documentation

v1.1.0: Changed name of package from normandinf to lava (lava_lib_rcf_insert_typeconversion.vip)

and added some type conversions (Boolean to string; Enum to String; String to Enum)

v1.1.3: Fixed bug with conversion from Enum to Numerics.

Added conversion from Numeric to Enum using "Variant to Data" node.

Added a lame icon. (Any user suggestion will be considered for next update!)

v1.1.4: Updated the description of plugin that now shows up to date info in RCF Options menu.

v1.1.8: Fixed bug when a type conversion node was inserted in a structure where the node was inserted on the main diagram.

Saved for LV 8.2

v1.1.11: Included all files in source distribution to make compatible with LabVIEW 2009.

v1.2.0: Added Unbundle cluster to terminal and corrected problem with Numeric to String.

v1.2.0.7: Added Singular to Array & Array to Singular.

License:

Distributed under the BSD license

Support:

If you have any problems with this code or want to suggest features:

please go to www.lavag.org and Navigate to the discussion page.

Distribution:

This code was downloaded from the LAVA Code Repository found at www.lavag.org

Click here to download this file

  • Like 2
Link to comment

VERY NICE!!!

Minor technical point: the operations inserted are not really a type cast, but a type conversion -- casting means changing the type, but not the data; whereas conversion involves changing both the data and its type.

Agreed, classes get typecast... I'll repackage it as "Type Conversion" and repost. I'll have more type conversions ready soon anyway.

  • Like 1
Link to comment

Agreed, classes get typecast... I'll repackage it as "Type Conversion" and repost. I'll have more type conversions ready soon anyway.

Great! Also, a couple other packaging-related comments:

1) While there are no real official requirements for JKI RCF plugin packages, JKI has prefixed the Package Name with "RCF" to make them easy to find in VIPM's package list. For example, this might be preferable: normandinf_lib_rcf_insert_typecast-1.0.1-1

2) The package's homepage points to here: http://www.monpapyrus.net/ . You might want to update this to point to this discussion topic (the package's actual homepage), or put a link to this topic (and a list of your RCF plugins) on your personal homepage. I say this, because the package homepage URL should help the user find new versions of the package and obtain support.

Thanks,

Link to comment

1) While there are no real official requirements for JKI RCF plugin packages, JKI has prefixed the Package Name with "RCF" to make them easy to find in VIPM's package list. For example, this might be preferable: normandinf_lib_rcf_insert_typecast-1.0.1-1

I did put _rcf_ in the build page. I was about to report this on jkisoft.com forums. I'll try again tomorrow, but I didn't succeed in changing the package build name. Perhaps something I put in the ini file. I'll double-check.

2) The package's homepage points to here: http://www.monpapyrus.net/ . You might want to update this to point to this discussion topic (the package's actual homepage), or put a link to this topic (and a list of your RCF plugins) on your personal homepage. I say this, because the package homepage URL should help the user find new versions of the package and obtain support.

I will.

BTW, is there any way to include a readme.txt file in the VIP file? Strictly speaking, my submission doesn't conform to LAVAcr standards since I linked the VIP file directly. I guess I should just zip it with the readme file...

Link to comment
BTW, is there any way to include a readme.txt file in the VIP file? Strictly speaking, my submission doesn't conform to LAVAcr standards since I linked the VIP file directly. I guess I should just zip it with the readme file...

Here's a VIE-itnernal VI that we use (amongst others) when we're adding files to our packages (we dynamically build chm help files and link them from the VIs that we build in the package). You need to call it during the post-build phase, otherwise it will corrupt your package. As always, the code I post is at-your-risk only.

Note: I don't have any inside knowledge of the vip file format - it might change at any time, and using this VI might screw up your packages. This code is not supported by JKI, or anyone else (including me :D )

VIPM.AddSupportFilesToPackage.vi

  • Like 2
Link to comment

I did put _rcf_ in the build page. I was about to report this on jkisoft.com forums. I'll try again tomorrow, but I didn't succeed in changing the package build name. Perhaps something I put in the ini file. I'll double-check.

Yes, let us know if you have trouble making this work. Here's how we do it with the JKI plugins in VI Package Builder:

post-17-124828263826_thumb.png

BTW, is there any way to include a readme.txt file in the VIP file? Strictly speaking, my submission doesn't conform to LAVAcr standards since I linked the VIP file directly. I guess I should just zip it with the readme file...

crelf's utility should do the trick. Let us know if you have any trouble making this work.

  • Like 1
Link to comment

Alright, this version 1.0.9 includes all the corrective actions mentioned above, including a proper readme file in the package...

Now, sometime in the future I'll make a nice icon for the RCF...

Here's a VIE-itnernal VI that we use (amongst others) when we're adding files to our packages (we dynamically build chm help files and link them from the VIs that we build in the package). You need to call it during the post-build phase, otherwise it will corrupt your package. As always, the code I post is at-your-risk only.

Note: I don't have any inside knowledge of the vip file format - it might change at any time, and using this VI might screw up your packages. This code is not supported by JKI, or anyone else (including me :D )

Thanks, that worked like a charm. You know you could make that available in the Code Repository, right? ;)

And here's a link to information on how to call post-build hook VIs in VIPM: Build Hook VIs

Ditto. Thanks for the demo.

Yes, let us know if you have trouble making this work. Here's how we do it with the JKI plugins in VI Package Builder:

The tree hiding the forest... :frusty:

Link to comment
Thanks, that worked like a charm. You know you could make that available in the Code Repository, right? wink.gif

I *could*, but it's actually part of an internal library that does a whole lot of VIPM pre/post build hook stuff, some of which doesn't make business sense for us to distribute. Someday I might release the post-build documentation generator that builds and adds linked chm documentation to all your package files, but that would require me to do some work, and I just don't have time pre-NI-Week. If you remind me in a couple of weeks, I'll have a look at releasing it, as well as some other stuff that supports VIPM package creation... maybe... :)

Link to comment
Thanks, that worked like a charm. You know you could make that available in the Code Repository, right? wink.gif

I *could*, but it's actually part of an internal library that does a whole lot of VIPM pre/post build hook stuff, some of which doesn't make business sense for us to distribute. Someday I might release the post-build documentation generator that builds and adds linked chm documentation to all your package files, but that would require me to do some work, and I just don't have time pre-NI-Week. If you remind me in a couple of weeks, I'll have a look at releasing it, as well as some other stuff that supports VIPM package creation... maybe... :)

François: I'll try to temp crelf with lots of beer at NIWeek to convince him ;)

Link to comment
Make sure he's back on his feet for the lunch.

Oh crap - I'd completely forgotten about that! Anyone got suggestions on where we could eat? I'm thinking that delicious Thai place on 6th, although I'd prefer it to be something a little more Texan... Maybe we should just grab a table in the exhibition floor lunch area?

Link to comment

I created a jing Video showing 3 things (For some reason it won't imbed into the post)

One kudo

One Bug

One Request.

Great RCF

Mark

Thanks Mark for the feedback. I'll upload an update in a few minutes.

PS: To embed Jing videos, you need to enable HTML (Click to configure post options) below Attachments.

<object width="474" height="280"> <param name="movie" value="http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/jingswfplayer.swf"></param>'>http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/jingswfplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/FirstFrame.jpg&containerwidth=474&containerheight=280&loaderstyle=jing&content=http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/2009-07-28_0923.swf"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/"></param>'>http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/"></param> <embed src="http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="474" height="280" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/FirstFrame.jpg&containerwidth=474&containerheight=280&loaderstyle=jing&content=http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/2009-07-28_0923.swf" allowFullScreen="true" base="http://content.screencast.com/users/nrc75/folders/Jing/media/f1cd5171-7e05-4211-b946-dcf540e227c5/" scale="showall"></embed> </object>

Link to comment

I've found a bug that I don't have time to check right now but will be a priority... Some conversions taking place in a frame structure react weirdly as shown on this video.

*** EDIT: This bug has been solved. For other RCF wireworkers out there, remember to use the Owner refnum instead of Owning VI refnum when placing a node on the diagram. In this case, I took the reference to the wire being selected, took a reference to its owning VI and deleted the wire. Then I placed a conversion node using the Owning VI reference. It would work well whenever the selected wire was on the main diagram but break all hell loose if the selected wire was inside a structure. By using Owner reference instead, I correctly placed the conversion node on the right diagram.

Link to comment

I've found a bug that I don't have time to check right now but will be a priority... Some conversions taking place in a frame structure react weirdly as shown on this video.

<object width="446" height="190"> <param name="movie" value="http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/jingswfplayer.swf"></param>'>http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/jingswfplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/FirstFrame.jpg&containerwidth=446&containerheight=190&loaderstyle=jing&content=http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/Bug_insideMultipleFrameStructure.swf"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/"></param>'>http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/"></param> <embed src="http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="446" height="190" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/FirstFrame.jpg&containerwidth=446&containerheight=190&loaderstyle=jing&content=http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/Bug_insideMultipleFrameStructure.swf" allowFullScreen="true" base="http://content.screencast.com/users/nrc75/folders/Jing/media/6efdc068-eb0f-47bc-a28a-49317a026f2e/" scale="showall"></embed> </object>

Hi François

Is it possible to get the plugin for LV8.2?yes.gif

I use this version and JKI RCF is supported from LV8.2.

thank in advance

Bjarne

Link to comment

Is it possible to get the plugin for LV8.2?yes.gif

I use this version and JKI RCF is supported from LV8.2.

Done. I didn't think it would be that complicated to transfer everything to 8.2. I'll try from now on to only develop these RCF plugins in 8.2 directly... unless LV2009 gives us something I cannot resist! :D

Link to comment

Hi François

Is it possible to get the plugin for LV8.2?yes.gif

I use this version and JKI RCF is supported from LV8.2.

thank in advance

Bjarne

I got this error sometimes, please help me!

My config: RCF auto start with LV.

My LV version:8.6.1f1

When I selct tools->RCF->options..-> NO operation , click cancel button, the the erro occurs.

post-14628-124892100737_thumb.jpg

I am sorry.

Can you see the image now?

Edited by huotom
Link to comment

I got this error sometimes, please help me!

My config: RCF auto start with LV.

My LV version:8.6.1f1

When I selct tools->RCF->options..-> NO operation , click cancel button, the the erro occurs.

post-14628-124892100737_thumb.jpg

Hi Huotom,

I'm not sure what this error is. This is something unrelated to my plugin. This framework is provided by JKI and you should report any error messages to them directly.

First, please browse the discussions found on their official RCF website. If you don't find your answer, login and post your question there.

If you get any error messages when you use a particular plugin, (Insert Type Conversion for example) then you should mention it on the discussion page related to this plugin.

good luck,

Link to comment

I got this error sometimes, please help me!

My config: RCF auto start with LV.

My LV version:8.6.1f1

When I selct tools->RCF->options..-> NO operation , click cancel button, the the erro occurs.

post-14628-124892100737_thumb.jpg

I am sorry.

Can you see the image now?

Huotom;

  • Are you seeing this error as a result of installing a new plugin?
  • Are you seeing this error when the RCF start?
  • Did you say "yes" to the mass compile dialog?

When you start the option, please be patient (even more if you did not mass compile).

If this error is preventing from starting LabVIEW, then you can disable the autostart in the RCF ini file.

Go to: LabVIEW Root\resource\JKI\RCF and edit the "Right Click Framework.ini" such as this key says: Auto Start with LabVIEW=FALSE

post-121-12489767797_thumb.png

Good luck.

PJM

Link to comment

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.