12-22-2016 11:40 AM
I recently redid a large application and decided to make a custom control that i would reuse everywhere for numeric indicators. As a preference, we used the NI Themed Numeric with the increment and decrement from the silver controls. It looks good. After replacing a lot (100+) controls with these my compiled application now takes up 2x the disk space. I didn't change it so that I have more indicators and I believe the only thing to add disk space are those controls when I did my update. Is there any way for me to reuse the control without the compile explicitly creating a new instance for every control? Do i need to create a type def instead? That seems to affect all of my limits and properties for each control that was previously setup. Does anyone have experience with this that can explain how custom controls work when using alot of the same design?
12-22-2016 12:17 PM
i hope you didnt replace every control 1 by 1. If you make a type def they will all automatically update when the type def is updated, so you would only have to do it once instead of 100
. As far as disk space, i dont have an answer for that, except the new control may take up more space than the previous, but thats an assumption.
12-22-2016 01:28 PM
Each instance takes up its own memory space. When I replace with a type def, i lose parameters of control - Min, Max, Increment. I was trying to avoid that. Would anyone with knowledge of how labview instantiates custom controls want to add input?
12-22-2016 01:38 PM
Is every control unique?
12-22-2016 08:25 PM
@tmf171 wrote:
When I replace with a type def, i lose parameters of control - Min, Max, Increment.
A Strict Type Def blocks your capability to set properties (since all instances have to be the same). A Type Def should not eliminate those individual properties.