LAVA 1.0 Content Posted September 1, 2006 Report Share Posted September 1, 2006 File Name: Class Iconizer File Submitter: jimi File Submitted: 4 Sep 2006 File Updated: 22 Oct 2006 File Category: LabVIEW OOP (GOOP) This tool allows user to apply new icon templates to LabVIEW classes. New template is applied to each item inside the class. User can define which parts of the template is transparent so that the template can be overlaid on top of the existing icons. Click here to download this file Download File:post-4014-1157146666.vi Quote Link to comment
bsvingen Posted September 1, 2006 Report Share Posted September 1, 2006 Great Will try it right away :thumbup: Quote Link to comment
Aristos Queue Posted September 2, 2006 Author Report Share Posted September 2, 2006 Beautiful! "Save a bug report! Write it yourself!" [*]You can also define the number of lines from the top of the template to always copy to method VI icons (this allows you to use mask color in the header) I had a hard time understanding "number of lines." Is this "number of rows of pixels" or "number of lines of text"? [Yeah, I could drill into the VI and puzzle it out, but it is easier to ask.] Quote Link to comment
LAVA 1.0 Content Posted September 2, 2006 Report Share Posted September 2, 2006 Beautiful! "Save a bug report! Write it yourself!" I had a hard time understanding "number of lines." Is this "number of rows of pixels" or "number of lines of text"? [Yeah, I could drill into the VI and puzzle it out, but it is easier to ask.] It means number of rows of pixels. If your mask color is white and you use white text in icon header, then the header text wouldn't be copied. Therefore you can define the header height in number of rows of pixels, so that the complete header is always applied. In addition all the pixels that are not of the mask color will be copied from everywhere else except header. Asking is defenitely easier, the code is really ugly. I coded it in a hurry and for just one purpose only. Perhaps later I'll add some more features later on and clarify the code: Inheriting overloaded VI icon from parent class VI Automatically generate color16 and monochrome icons from color icon Automatically applying color for the frame surrounding icon; red for private and blue for protected (user defineable colors) Allow user to select library items to include / exclude Store settings to file Quote Link to comment
Aristos Queue Posted September 2, 2006 Author Report Share Posted September 2, 2006 It means number of rows of pixels. If your mask color is white and you use white text in icon header, then the header text wouldn't be copied. Therefore you can define the header height in number of rows of pixels, so that the complete header is always applied. In addition all the pixels that are not of the mask color will be copied from everywhere else except header. Asking is defenitely easier, the code is really ugly. I coded it in a hurry and for just one purpose only. Perhaps later I'll add some more features later on and clarify the code: Inheriting overloaded VI icon from parent class VI Automatically generate color16 and monochrome icons from color icon Automatically applying color for the frame surrounding icon; red for private and blue for protected (user defineable colors) Allow user to select library items to include / exclude Store settings to file Since you're playing with the icons, you should know that the initial icons for the private data control and the library are both set by VIs in <labview>\resource\plugins\ directory. The VIs are named something with "icon" in the name... I don't recall off hand. You can rewrite those VIs if you want different initial icons (or even create a walk through wizard for establishing those initial icons). Quote Link to comment
LAVA 1.0 Content Posted September 2, 2006 Report Share Posted September 2, 2006 Hi folks, I decided to rewrite the whole program. There are only few new features. The biggest change is that I cleaned up the code very very much. I have encapsulated everything inside classes so that all components should be somehow reusable and intuitive. I also use extendible factory (design pattern) to create new objects so that support for new decendent classes can be added without touching the present classes. This was more or less a kind of an excercise to get aquinted with LabVOOP. The package may also be good to check out for LabVOOP newbies to get acquiainted with LabVOOP and OOP in general. The few changes are listed below All icons are automatically derived from 256 color icon, so it's enough to edit the color icon There is a new button which clears all icons (owerwrites icons with template icon) Since you're playing with the icons, you should know that the initial icons for the private data control and the library are both set by VIs in <labview>\resource\plugins\ directory. The VIs are named something with "icon" in the name... I don't recall off hand. You can rewrite those VIs if you want different initial icons (or even create a walk through wizard for establishing those initial icons). Hmmm... Interesting. Could I use those VIs not only to create custom class icons, but to create a custom class wizard, that is executed when ever a class is created? This could allow me to define a set of predefined project items I could select to add to the library and, well everything. So the question probably is if I can anyhow get access to the referense of the class library being created. Can I? Edit: I forgot the ZIP Download File:post-4014-1157220204.zip Quote Link to comment
Michael Aivaliotis Posted September 3, 2006 Report Share Posted September 3, 2006 If you are creating a tool and updating it like this, I suggest you submit it to the Code Repository. This is why the code repository was created. As you can see there's already a GOOP category. Quote Link to comment
Aristos Queue Posted September 3, 2006 Author Report Share Posted September 3, 2006 Hmmm... Interesting. Could I use those VIs not only to create custom class icons, but to create a custom class wizard, that is executed when ever a class is created? This could allow me to define a set of predefined project items I could select to add to the library and, well everything. So the question probably is if I can anyhow get access to the referense of the class library being created. Can I? Nope. That VI only controls the icons. It takes an icon set in and outputs an icon set. That being said, the functions for "add to library" etc are all available. Take a look at the VI Server meths/properties available for LVClass library files. Quote Link to comment
LAVA 1.0 Content Posted September 3, 2006 Report Share Posted September 3, 2006 Nope. That VI only controls the icons. It takes an icon set in and outputs an icon set. That being said, the functions for "add to library" etc are all available. Take a look at the VI Server meths/properties available for LVClass library files. I already noticed that I can create and open projects, libraries and classes using invoke nodes. But to create the classes at the position I'd like, requires either that I write a project tree control of my own and let user to select the position. Alternatively if I could somehow add a new item to the right-click menu of the project browser which I could catch in an event case of a process running in background. The first alternative is laborous and the second alternative isn't there as far as I understand. My main duty is not to write class wizards but scientific software, so I probably need to stick with what others can provide. p.s. When I was walking outside, I noticed that I made a bug in the latest version class iconizer, the mask is computed incorrectly so that practically the color mask doesn't count. I'll post later the corrected version to the Code Repository as Michael_Aivaliotis suggested. Quote Link to comment
LAVA 1.0 Content Posted September 4, 2006 Report Share Posted September 4, 2006 If you are creating a tool and updating it like this, I suggest you submit it to the Code Repository. This is why the code repository was created. As you can see there's already a GOOP category. I submitted newer version to Code repository, it'll appear there as soon as one of the forum adimins has accepted it. Quote Link to comment
Michael Aivaliotis Posted September 4, 2006 Report Share Posted September 4, 2006 I submitted newer version to Code repository, it'll appear there as soon as one of the forum adimins has accepted it.I've approved your code submission and now this discussion thread has become the support topic for it. 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.