Popular Post jgcode Posted January 18, 2012 Popular Post Report Share Posted January 18, 2012 Howdy Attached is a tool that automates the creation of a Child Class in the LabVIEW Project Environment. This is my first foray into LabVIEW Project Integration, and was a good example as it is a simple one. There are no example VIs in package yet, but here is a video: <!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="470" height="625" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/2d60299d-20fc-47df-ae5d-da3987577dc2/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/2d60299d-20fc-47df-ae5d-da3987577dc2/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/2d60299d-20fc-47df-ae5d-da3987577dc2/FirstFrame.jpg&containerwidth=470&containerheight=625&content=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/2d60299d-20fc-47df-ae5d-da3987577dc2/LVOOP%20Assistant%20-%20Create%20Child%20Class.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/2d60299d-20fc-47df-ae5d-da3987577dc2/" /> Unable to display content. Adobe Flash is required.</object> For things like this - Project Integration has a more natural workflow than '>>Tools' The package is LAVA namespaced as I plan to release this on LVTN and also to release more LVOOP helper tools. Feedback welcomed! lava_rsc_create_child_class-1.0.0.14.vip 5 Quote Link to comment
drjdpowell Posted January 19, 2012 Report Share Posted January 19, 2012 I successfully installed it with VI Package Manager (no error), but I can’t find it, either right-clicking or under Tools>>LAVA. Looking for the files, I seem to be missing a \resource\Framework\Providers\CreateChildClass directory. Other files seem to have installed. 1 Quote Link to comment
jgcode Posted January 19, 2012 Author Report Share Posted January 19, 2012 I successfully installed it with VI Package Manager (no error), but I can’t find it, either right-clicking or under Tools>>LAVA. Looking for the files, I seem to be missing a \resource\Framework\Providers\CreateChildClass directory. Other files seem to have installed. Thanks heaps for the feedback. Its the first time I have used build hooks in anger with VIPM and there was a path that should have been relative but wasn't. It should have installed correctly on a 32-bit LabVIEW install on a x64 OS (which was the only machine I had to test it). Do you mind trying again - I upload a new version in the OP. Cheers! 1 Quote Link to comment
drjdpowell Posted January 19, 2012 Report Share Posted January 19, 2012 Works now. Great work! I must have a hundred times though “Why can’t I just right-click a child class?" Suggestions off the top off my head (no idea how hard any of it is to do): 1) Automatically open the Properties window of the new child (as that’s always the next step). 2) On the popup that asks for the child’s name, have checkbox options for: — copy parent class icon to child — copy parent private data control icon to child Usually the child needs icons that are modifications of the parents icons, so this would save a lot of cut-and-paste. — James 1 Quote Link to comment
jgcode Posted January 19, 2012 Author Report Share Posted January 19, 2012 Works now. Great work! I must have a hundred times though “Why can’t I just right-click a child class?" Suggestions off the top off my head (no idea how hard any of it is to do): 1) Automatically open the Properties window of the new child (as that’s always the next step). 2) On the popup that asks for the child’s name, have checkbox options for: — copy parent class icon to child — copy parent private data control icon to child Usually the child needs icons that are modifications of the parents icons, so this would save a lot of cut-and-paste. — James Thanks for testing. Great feedback, I will see what I can do. I can definitely look at modifying icons, but would prefer using layers - unfortunately the Icon Editor API is not supported in 2011 as it was broken by the addition of PPL's and there is no plans to release it any time soon (I have been asking since beta but it is unsupported). I really like layers as it makes it easier to edit icons in the future. 2011 also includes some new scripting features and fixes so I am looking forward to releasing a few more LVOOP tools. My plan is to break down some of the 2009 LVOOP Assistant features and get them working with Project Integration, which is more usable and will be faster to execute and easier to extend than just having one bulky tool. 1 Quote Link to comment
drjdpowell Posted January 19, 2012 Report Share Posted January 19, 2012 More reasons for me to finally upgrade from LabVIEW 8.6. Quote Link to comment
Jon Kokott Posted January 19, 2012 Report Share Posted January 19, 2012 Thanks you for this. Quote Link to comment
Mr Mike Posted January 19, 2012 Report Share Posted January 19, 2012 I'm pretty sure you can hook into the New... menu and can control where in the project item is added. Is there a reason you didn't add the item to the New... menu? That's where I would expect to find it. (I know that everything in the New... menu is added to the project item that is selected and this would be different. But that's still where I would expect to find this.) 1 Quote Link to comment
jgcode Posted January 20, 2012 Author Report Share Posted January 20, 2012 Thanks you for this. Glad you like it I'm pretty sure you can hook into the New... menu and can control where in the project item is added. Is there a reason you didn't add the item to the New... menu? That's where I would expect to find it. (I know that everything in the New... menu is added to the project item that is selected and this would be different. But that's still where I would expect to find this.) Mike, thanks for the feedback. It makes sense that New... is more intuitive. However, my reason is that I intend is to keep adding tools under LVOOP Assistant menu item - so when a user installs a tool they know where to look etc... I can always change it tho. Quote Link to comment
jgcode Posted January 20, 2012 Author Report Share Posted January 20, 2012 1) Automatically open the Properties window of the new child (as that’s always the next step) Not sure if I can do this, I have a feeling I have tried to before as well with no luck. Mike might know if this is possible in 2011? Quote Link to comment
Popular Post Mr Mike Posted January 20, 2012 Popular Post Report Share Posted January 20, 2012 Not sure if I can do this, I have a feeling I have tried to before as well with no luck. Mike might know if this is possible in 2011? I think it's possible in any version. I did a quick test and it looks like you should be able to call resource\Framework\Providers\VILibrary\LIBUIP_Properties_Dialog.vi with a reference to the new class then it will do exactly what you want. You just need to invoke Save after the dialog closes. 3 Quote Link to comment
gb119 Posted January 24, 2012 Report Share Posted January 24, 2012 Is there any documentation for writing Project Window Providers or is it a question of reverse engineering... ? Quote Link to comment
jgcode Posted January 24, 2012 Author Report Share Posted January 24, 2012 Is there any documentation for writing Project Window Providers or is it a question of reverse engineering... ? Hi Gavin You have to be part of the Project Providers group. I would contact them if you are interested. Quote Link to comment
jgcode Posted January 25, 2012 Author Report Share Posted January 25, 2012 Hi Guys I have implemented some feedback Version 1.1.0: - (there are no Icon Layers so the tool) Attempts to copy the Parent Icon theme to the Child (currently the Library banner created is 12x32 which is the default LabVIEW banner size). I'll work on this, for all those skinner banner users - Opens the Class Properties dialog (thanks Mike!) <!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="800" height="600" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/171e6cc3-3ccc-4e70-a526-21d66f339b36/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/171e6cc3-3ccc-4e70-a526-21d66f339b36/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/171e6cc3-3ccc-4e70-a526-21d66f339b36/FirstFrame.jpg&containerwidth=1005&containerheight=768&content=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/171e6cc3-3ccc-4e70-a526-21d66f339b36/LVOOP%20Assistant%20-%20Create%20Child%20Class%201.1.0.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/171e6cc3-3ccc-4e70-a526-21d66f339b36/" /> Unable to display content. Adobe Flash is required.</object> Cheers -JG lava_rsc_create_child_class-1.1.0.15.vip Quote Link to comment
jgcode Posted January 31, 2012 Author Report Share Posted January 31, 2012 I'm pretty sure you can hook into the New... menu and can control where in the project item is added. Is there a reason you didn't add the item to the New... menu? That's where I would expect to find it. (I know that everything in the New... menu is added to the project item that is selected and this would be different. But that's still where I would expect to find this.) For anyone interested... I checked up on this, unfortunately you can't plug-in here - it's all generated in C (unless you have access to LabVIEW source ). To plug-in in G, you can only do what I have done. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.