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

Dec 15, 2009 0 Replies

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


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required