LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Server Error in CVI

When I use "Create ActiveX Server" tool, there generate an error in the "Edit ActiveX Server" panel. I click the "Save and Generate" button, it popup a messagebox with "A custom control callback raised an exception".

Before and after this time, I have never see this phenomenon again. I wonder what has happened and in what conditions it will happen again. The project is attached behind.
0 Kudos
Message 1 of 3
(3,096 Views)
You might run into this case if you had assigned interfaces to objects and then deleted the interfaces. This was a problem that was reported earlier and we are looking into correcting this for future CVI releases. The best way to avoid this would be to ensure that you plan ahead what objects and interfaces you would need to avoid removing and recreating objects and interfaces.
If you run into this issue where you are unable to generate the server code because of this error and you cannot restart the server configuration from scratch, please contact NI Support.
Bilal Durrani
NI
Message 2 of 3
(3,092 Views)
I find out why this problem occur and how to solve it.

The .axs is an XML file in fact. When Delete an interface, the CVI tool delete the interface directly, but do not change the left interface index. But generating code require the proper index.

The method to solve it is changing the index mannually. Open the .axs file with a XML editor such as "Stylus Studio" , find the node "ObjectList|Object|InterfaceIndexList", and change the listed node "InterfaceIndex"'s text to the right one-based index, then everything is OK.
0 Kudos
Message 3 of 3
(3,056 Views)