LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cw3dgrph activex version

Actually i need to understand how i can force CVI to load cw3dgrph.ocx Version 7.1 into a panel, when both Version 7.1 and 8.0 of that control are present on a machine. On my development system, i have CVI 6 and Labview 8. Version 8 of the control came with Labview and was recently built into an application, but now we should use Version 7.1 for license reasons. So yesterday Version 7.1 of the control was put onto the development machine and registered.

Observations:
A) In the CVI GUI designer, i can only create Version 7.1 of the control. When i select the ActiveX, the panel shows the OCX path in the bottom.
B) When i view properties of the new control the "About" tab makes a popup panel showing "Version 8.0".
C) When i run our application, Version 8.0 is still loaded.

Where can i find a description on how CVI works with activeX controls?
Is a different version of a control considered a different control?
Is the C wrapper version dependent?
When do i have to create a new C wrapper?
How is Export and Imort styles in the context menu of the gui designer version dependent? Can i use this method to restore previous control properties when changing the control version?
Where is a description of the C:\Programme\National Instruments\Shared\MeasurementStudio\help\cw3dgrph.ver file?


0 Kudos
Message 1 of 4
(4,507 Views)
Hello Dietert,
Why do you want to use version 7.1 for licensing reasons?  If you have CVI 6.0 installed and LV 8.0 installed the version of cw3dgraph should be newer than 6.0 because LV is going to install a newer version.  A different version of the control is going to be considered a different control.  In general you shouldn't have two versions of the cw3dgraph on the same machine.  A newer piece of software will install a newer version but that newer version should be licensed.
The C Wrapper is only dependant if you add new functions or modify existing ones between versions.  In general you should generate a new C wrapper any time you are using a different version of the control.  Again this might not necessarily have to be done, but this is the safest way to do things.
The import export styles would only be dependant on versions if one of the styles that are being exported is something new to the newer version of the 3dGraph.  Again in general this is not the case so you should be able to import a style from a newer graph to an older one and vice versa.
Why do you want to read C:\Programme\National Instruments\Shared\MeasurementStudio\help\cw3dgrph.ver file? In my opinion this shouldn't be necessary.

Best regards,
AmirG
0 Kudos
Message 2 of 4
(4,445 Views)
In the meantime we did some research on our own.

The problem of ActiveX control versions arises when producing CVI applications to be distributed to clients. We do not produce software for our own but as a component of our measurement machines. While our development machines may have various versions of NI products, the target machine is equipped with a CVI 7 runtime plus some Measurement Studio ComonentWare ActiveX controls, all in Version 7. Therefore as developpers we are just trying to select the correct version of the ActiveX control to be used in the application.

The CW3DGraph Version 8 persistance info is incompatible with Version 7 control. That means, if you design with the Version 8 control, the panel cannot be loaded on the target machine. The control will appear - if at all - with default settings, in a 30 day evaluation version due to missing license info. Something similar happens if you try to design in the Version 7 control with a CVI 6 GUI editor. It seems to us that the Version 8 control loads the Version 7 persistance, but we are not sure. What will happen when you try to load the panel is almost unpredictable.

We also implemented a scheme to load the ActiveX into the panel at runtime. A pattern for this can be obtained running the UIR -> code converter tool. This produces code with another undocumented CVI function, named NewActiveXControlFromPersistance() or so.  It turns out that even with dynamic loading of the ActiveX, CVI does not provide version control. In fact we did not find a way to select a specific version to be loaded.

Obviously NI does not have or is not willing to provide specs/documentation on how they work with ActiveX control versions in CVI. In a previous answer NI claims: "Each version is another control" and "A new version overwrites a previous version". This is contradictory and indicates a true mess. I was asking for a specific configuration file in order to help NI locate applicable specs or documents.
0 Kudos
Message 3 of 4
(4,429 Views)

Hi dietert,

Understanding how ActiveX versioning works sometimes can be a little tricky sometimes.  The first rule of thumb to remember is that you can only have one version of an ActiveX control registered on your system at one time. Now, you might have multiple copies of different versions of the controls scattered throughout your system, but only one can be registered at any given time.

For example, you might have version 7.0.0 and 8.0.0 of the ActiveX controls on your machine. One of these controls will be registered and thus any IDE that supports ActiveX containers will use the control that's registered. So if 8.0.0 is registered, then when you drop an ActiveX control down for example in CVI, it will say 8.0.0 in the About box. Then if you unregister that 8.0.0 version and register the 7.0, all programs will now use that version.

I ran a quick test for this on my machine where I had version 7.0.0 and 8.1.1 of the cw3dgrph.ocx control. Version 8.1.1 (in the system32 directory) was registered and thus my CVI app was using this version. I verified this by looking into the About box and viewing what control was loaded at runtime (there's a number of tools out there to do this; I like Process Explorer which shows me the guts of a process and all the loaded DLLs). The process loaded version 8.1.1 which is what I expected.

I then unregistered my 8.1.1 control and registered my 7.0.0 control that was on my desktop. When I opened my app that previously had the 8.1.1 control, it warned me and told me that it couldn't load the control and a newer version was needed and that the default settings were going to be used. This is expected. Essentially, some properties were added in 8.1.1 and the 7.0.0 controls do not have any way to interpret these properties, so they revert all properties to the default values.

Notice now if you drop down and ActiveX control, it’s the 7.0.0 version cause it’s registered on the system. 

Now, Microsoft did come out with the ability in the last few years to have side-by-side COM component versioning, but our controls don't support that since we've been around for longer than that new technology came out. 

Now in your case, the recommended approach to development is to bring over the 7 version of the ActiveX control, unregister version 8 and then register version 7. Now when you are developing in CVI, you will be working with version 7. Thus when you deploy, you are guaranteed that you didn’t' use any new features or have issues with licensing.

Hope this clears things up! If you have any additional questions, let me know.

Best Regards,

Jonathan N.
National Instruments
Message 4 of 4
(4,411 Views)