Jump to content

Programmatically applying typedef changes


AlexH

Recommended Posts

I have a large program which makes heavy use of an enum typedef containing ~100 values.  For some reason it is extremely slow to add new values to this typedef (any idea why would be much appreciated).  

Following this thread:http://forums.lavag.org/Programamtically-e...lues-t2761.html, I have made a simple script which adds new strings to the typedef, but I can't find a way to programatically apply the typedef changes afterwards.  I don't have much experience with using VI server, and maybe have got lost in the maze of methods, but searching for "apply" in the class browser search didn't show anything.

Any ideas?

Cheers,

Alex

Link to comment

Editing enums through the properties dialog is slow (different LV versions are faster than others). To be specific, it just seems to take a long time for the dialog itself to load. I don't why this is. However, there are a couple of things you can do to make your life easier.

1) right-clicking on the enum brings up the context menu.. from here, you can add / remove items (one at a time).

2) you can edit the current item by holding the <CTRL> button and placing the pointer over the control... the pointer should change to the string edit glyph. Click the mouse to edit.

3) while entering enum values directly on the control... use <SHIFT> + <ENTER> to add and edit a new value.

4) if you have a list you can use VI Server :unsure: .. Oh, you got that one already.

As far as programmically executing the 'Apply' menu item in your custom control... You could try using the virtual keyboard within your script VI. If I get a chance this evening I post an example.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.