Error when I use correct license key. May be there is a problem with software?

-1
String sLicenseKey = "AAAA-AAAA-AAAA-AAAA-AAAA-AAAA";
SwDmDocumentOpenError nRetVal = 0;
SwDmCustomInfoType customInfoType;
SwDMClassFactory swClassFact = default(SwDMClassFactory);
swClassFact = new SwDMClassFactory();

SwDMApplication swDocMgr = (SwDMApplication)swClassFact.GetApplication(sLicenseKey);
SwDMDocument17 swDoc = (SwDMDocument17)swDocMgr.GetDocument(
    @"file path+name", SwDmDocumentType.swDmDocumentPart, 
    false, out nRetVal);
SwDMConfigurationMgr swCfgMgr = swDoc.ConfigurationManager;
SwDMConfiguration14 swCfg = (SwDMConfiguration14)swCfgMgr.GetConfigurationByName("Config Name");
String materialProperty = swCfg.GetCustomProperty2("Property Name", out customInfoType);

I have error message

"Class is not licensed for use (Exception from HRESULT: 0x80040112)"

c#
solidworks
asked on Stack Overflow Feb 3, 2020 by mayorkalter • edited Feb 3, 2020 by Marco

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0