Get and Set Frame Rate for a Motion Study leads to a crash when using late binding.

Hi All,

I am having a problem when I use Late Binding to Get and Set the Frame Rate for a Motion Study. Following is the code snippet that I use.

int nFrameRate = System.Convert.ToInt32(msProperty.GetType ().InvokeMember ("GetFrameRate",BindingFlags.InvokeMethod,null,msProperty,null));

msProperty.GetType().InvokeMember ("SetFrameRate",BindingFlags.InvokeMethod,null,msProperty,new object[] { nFrameRate });

msProperty is an object of MotionStudyProperties class.

This code was running fine in early binding. But the application does not work across different versions of SolidWorks, hence I had to use late binding.

A resolution or workaround for the issue would be highly appreciated.

Thanks.

Noel

Reply to
Noel
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.