Marcus Törndahl Posted January 13, 2009 Report Share Posted January 13, 2009 Well before anyone returns any message on "...well why don't you use an enum instead..." my quest is to use an ring constant with index numbers ranging from 1 to 1024. The problem is that type def ring constants do not update as enum constants. The only way, I know , is to change the constant to a control and then back to a constant. Hmmm ... well this would be a excellent task to create a tool to programmatically search for all ring constants and do the type change constant-->control-->constant. Well there I am stuck . Could this be done? Quote Link to comment
Antoine Chalons Posted January 13, 2009 Report Share Posted January 13, 2009 QUOTE (Marcus Törndahl @ Jan 12 2009, 10:34 AM) Well before anyone returns any message on "...well why don't you use an enum instead..." my quest is to use an ring constant with index numbers ranging from 1 to 1024. The problem is that type def ring constants do not update as enum constants. The only way, I know , is to change the constant to a control and then back to a constant. Hmmm ... well this would be a excellent task to create a tool to programmatically search for all ring constants and do the type change constant-->control-->constant. Well there I am stuck . Could this be done? Maybe you'll find http://labviewartisan.blogspot.com/2008/12/plug-in-vis-for-right-click-menu.html' rel='nofollow' target="_blank">this article -and the comments below- interesting Quote Link to comment
ned Posted January 13, 2009 Report Share Posted January 13, 2009 QUOTE (Marcus Törndahl @ Jan 12 2009, 04:34 AM) Well before anyone returns any message on "...well why don't you use an enum instead..." my quest is to use an ring constant with index numbers ranging from 1 to 1024. The problem is that type def ring constants do not update as enum constants. The only way, I know , is to change the constant to a control and then back to a constant. Hmmm ... well this would be a excellent task to create a tool to programmatically search for all ring constants and do the type change constant-->control-->constant. Well there I am stuck . Could this be done? If you change the numeric representation of the ring within the type definition, say from I32 to U32, it will force all instances of that type definition to update. Quote Link to comment
Marcus Törndahl Posted January 16, 2009 Author Report Share Posted January 16, 2009 QUOTE (ned @ Jan 12 2009, 03:50 PM) If you change the numeric representation of the ring within the type definition, say from I32 to U32, it will force all instances of that type definition to update. Nop does not work for ring constants, sorry I have already tried it. Well all the instances are forced to update to that numeric representation but if you have added a new state in the ring type def and then do the change of numeric representation the ring constants is not updated to include the new state . Quote Link to comment
Marcus Törndahl Posted January 16, 2009 Author Report Share Posted January 16, 2009 QUOTE (ned @ Jan 12 2009, 03:50 PM) If you change the numeric representation of the ring within the type definition, say from I32 to U32, it will force all instances of that type definition to update. Nop does not work for ring constants, sorry I have already tried it. Well all the instances are forced to update to that numeric representation but if you have added a new state in the ring type def and then do the change of numeric representation the ring constants is not updated to include the new state . Quote Link to comment
ned Posted January 16, 2009 Report Share Posted January 16, 2009 QUOTE (Marcus Törndahl @ Jan 15 2009, 05:09 AM) Nop does not work for ring constants, sorry I have already tried it. Well all the instances are forced to update to that numeric representation but if you have added a new state in the ring type def and then do the change of numeric representation the ring constants is not updated to include the new state . You need to make it a strict type definition. Quote Link to comment
ned Posted January 16, 2009 Report Share Posted January 16, 2009 QUOTE (Marcus Törndahl @ Jan 15 2009, 05:09 AM) Nop does not work for ring constants, sorry I have already tried it. Well all the instances are forced to update to that numeric representation but if you have added a new state in the ring type def and then do the change of numeric representation the ring constants is not updated to include the new state . You need to make it a strict type definition. Quote Link to comment
Marcus Törndahl Posted January 17, 2009 Author Report Share Posted January 17, 2009 QUOTE (ned @ Jan 15 2009, 04:34 PM) You need to make it a strict type definition. Aha yes that works just fine, najs thanks. So by changing representation for the strict type def ring control all the ring constants will automatically be updated. Even the VIs not in memory...? Thank you all for the excellent help I have recieved here. BR, Marcus Quote Link to comment
Marcus Törndahl Posted January 17, 2009 Author Report Share Posted January 17, 2009 QUOTE (ned @ Jan 15 2009, 04:34 PM) You need to make it a strict type definition. Aha yes that works just fine, najs thanks. So by changing representation for the strict type def ring control all the ring constants will automatically be updated. Even the VIs not in memory...? Thank you all for the excellent help I have recieved here. BR, Marcus Quote Link to comment
LAVA 1.0 Content Posted January 17, 2009 Report Share Posted January 17, 2009 QUOTE (Marcus Törndahl @ Jan 16 2009, 09:21 AM) ... Even the VIs not in memory...? ...Marcus I suspect not. if it does not work with the non-in-memory VIs, just make sure you have the "Tree.vi" for app open when you make the change. Ben Quote Link to comment
LAVA 1.0 Content Posted January 17, 2009 Report Share Posted January 17, 2009 QUOTE (Marcus Törndahl @ Jan 16 2009, 09:21 AM) ... Even the VIs not in memory...? ...Marcus I suspect not. if it does not work with the non-in-memory VIs, just make sure you have the "Tree.vi" for app open when you make the change. Ben 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.