AnsweredAssumed Answered

SolidWorks crashes after DisplayDimension.GetDimension is called

Question asked by Igor Tsinman on Jun 20, 2015
Latest reply on Aug 8, 2017 by Jacob Corder

Based on SolidWorks SDK C# project template and this SolidWorks API Help 2015 SOLIDWORKS API Help - Macro Features and Dimensions

I'm trying to create a macrofeature with some parameters available as display dimensions, so I inserted macro feature class into the project generated by wizard and substituted "Create Cube" command with my code creating an instance of my macrofeature.

The problem is that I have crash after calling DisplayDimension.GetDimension function in Regenerate. The steps to reproduce: 1) start SolidWorks and load plug-in 2) Create new part 3) press "Create Cube" button and see the macrofeature is created with a cylinder body 4) close the document 5) SolidWorks crashes.

The same code with commented DisplayDimension.GetDimension call works just fine.


What can be the problem and how I can correct it?