protected override void DoAction() { if (((Configuration)SolidWorksDoc.GetActiveConfiguration()).Name == ConfigName) { return; } if (!SolidWorksDoc.ShowConfiguration2(ConfigName)) { throw new SolidWorksActionException(this); } }
protected override void DoAction() { string myConfigName = ParseStringForVariable(ConfigName); Message("Setting active configuration to \"" + myConfigName + "\""); Configuration configuration = (Configuration)SolidWorksDoc.GetActiveConfiguration(); if (configuration.Name == myConfigName) { return; } if (!SolidWorksDoc.ShowConfiguration2(myConfigName)) { throw new SolidWorksActionException(this); } }