How to make the InsertSizeDimension method work in C #?

Good day. I can not get the InsertSizeDimension method to work correctly in C # .The code on the link is also not working.

http://help.solidworks.com/2016/english/api/swdimxpertapi/Get_and_Set_Size_Dimension_Example_CSharp.htm#_ga=2.206804757.729758164.1562507122-f409b270-9c25-11e9-8c86-b91f7b747a58

Who faced this, tell me how to make theInsertSizeDimension method work correctly?

SolidworksApi/macros