AnsweredAssumed Answered

Using Obsolete Methods

Question asked by Rob Edwards on Mar 20, 2019
Latest reply on Mar 23, 2019 by Artem Taturevych

So I've thought about this a few times before, but this is the first time I've been compelled to ask.


I'm getting to grips with macro features - so much to learn - but it appears that during my rebuild function I have to update the reference points for my dimensions.

So far I've written some code that simply updates one of the reference points with the system value.

The SystemValue Property (IDimension) is obsolete, and the help file says use GetSystemValue3 Method (IDimension)

Now the help file says GetSystemValue3 returns the value in system units..

but I'm guessing this is incorrect.


I'm getting a Type Match Error using


Dim ArrDara(2) as Double
ArrData(1) = swDimension.GetSystemValue3(swThisConfiguration, Empty)


In one of the examples - 2013 SOLIDWORKS API Help - Get Dimension of Distance Mate Example (VBA)


dimValue is declared as a variant - presumably an array of doubles


So I got to thinking as I am only interested in the value in this configuration and this is during my rebuild function - I want it to be as quick as possible.

Would I be better using the obsolete property (It still works) or could this lead to problems going forward?