Enumerate Named Components


Recommended Posts

I was thinking of having optional page and component type arguments to the function, and if they're not specified it's global.

 

Even without that, it's easy to parse the results and filter by whatever criteria you want if they're presented in the same format as in a script dump ("Page.MyPage.MyButton"), etc.

Link to comment
Share on other sites

Wait a sec, what I just said wasn't right.  You can parse the component list by type if they have default names, but if given explicit non-default names, the name won't necessarily give the type (though it will give the page name).

 

So yeah, I was thinking of an optional argument for component type.

 

You could accommodate multiple component types by doing a bitmask word, but if you use a string specifier, it's probably not practical to allow more than one type to be specified.  Also for page names.  IOW, I'm thinking that if the page name argument is used, then it would be reasonable to limit it to one page name string, rather than try to allow the user some way to ask for multiple specific pages in one call to the function.

Link to comment
Share on other sites

Exactly what is the purpose of this?  If you have the docking Properties window (View -> Properties) visible, it will show all the common properties for the selected components.  So, if, for example, you had ten variable value components, and you wanted to change the units of all of them to "mV", you'd just select the ten components, go to the properties and change the units and it will apply to them all.  It even works across different component types, provided they have common properties.  For example, you could make a bunch of components disappear because all components have a visible property.

 

And, with 5.90, you can hold the shift key and select multiple components even from the workspace, making this process even easier.

Link to comment
Share on other sites

Not sure [yet].  What started me thinking along that path was the thread where the guy wanted to change the button caption in sequence.  I started thinking about the global version of his case, like say you wanted to turn every button in the app green based on some logic or something like that.  IOW, global or semi-global changes to components properties for which automation isn't provided in the short dialog when you insert or edit the component.

 

Like I said, I have no immediate application for this (and have never needed to do so in 10 years of DAQFactory use), but it seemed like something that would be powerful and useful to have, if simple to add.

Link to comment
Share on other sites

There, unfortunately, is a limit to how much flexibility we want to offer the customer.  Although against the EULA, at a certain point, if you give too much flexibility, someone could easily use DAQFactory to create a slightly higher level DAQ tool, then using the Developer license basically compete with us without paying us anything.  So, for now, dynamic control creation and things like your request remain on the back burner.  The alternative is to remove the royalty free runtime option.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.