02-20-2010 02:50 AM
Hi, I have just bought Measurement Studio Pro version so that I could use the 3d graphs. I have VS 2008 SP1 going under Windows 7. All the measurement studio .net controls work fine but I can't get the 3d graph to work. If I place the control on a simple form and run it I get the following error:
System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))" Source="MeasurementStudio3DGraph" StackTrace: at MeasurementStudio3DGraph.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at MeasurementStudio3DGraph.My.MyProject.MyForms.get_Form1() at MeasurementStudio3DGraph.My.MyApplication.OnCreateMainForm() in D:\Source\MiscVB.Net\MeasurementStudio3DGraph\My Project\Application.Designer.vb:line 35 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at MeasurementStudio3DGraph.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Runtime.InteropServices.COMException Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))" Source="System.Windows.Forms" ErrorCode=-2147221164 StackTrace: at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at MeasurementStudio3DGraph.Form1.InitializeComponent() in D:\Source\MiscVB.Net\MeasurementStudio3DGraph\Form1.Designer.vb:line 198 at MeasurementStudio3DGraph.Form1..ctor() InnerException:
Is there anything I am not doing right?
Thanks,
Cd
Solved! Go to Solution.
02-20-2010 03:06 AM
It have tried doing a regsvr32 of the 3d graph ocx. Registering works fine but it doesn't solve my issue.
The error seems to point to a line in the Form1.Designer.vb:
CType(Me.CWGraph3D1, System.ComponentModel.ISupportInitialize).EndInit()
Has anyone had the same problem before? For info, this is a new laptop so I had no older version of either Visual Studio or Measurement Studio on it.
Thanks,
Cd
02-25-2010 08:44 AM
Hello cdouillet,
Check your Measurement Studio version. If it is previous to Measurement Studio 2009, it is unsupported on Windows 7 and you will need to change to Windows XP or Vista; or upgrade Visual Studio to 2009.
http://zone.ni.com/devzone/cda/tut/p/id/10383
02-25-2010 10:58 AM
Hi, I forgot to mention, yes I have Measurement Studio 2009. And I've just solved my problem:
Project->Properties->Compile, select Advanced Compile Options, set Target CPU to x86.
I'm happy I solved this, but I would like to release an x64 version of my apps in the future, as most computers will probably soon be in 64b. Any plans from NI to get this working? Ideally, the 3dgraph.ocx should be converted to .net. It is an excellent control, way better than any I've tested before both in terms of look and performance.
Cheers.