1 Reply Latest reply on Nov 5, 2018 8:06 AM by Dan Frey

    RecognizeFeatureAutomatic giving errors in VBA that I am unable to resolve

    Marc Battistello

      Im trying to get the FeatureWorks api to work in VBA. Im trying to get the sample code to work but it keeps throwing errors.

       

      2015 SOLIDWORKS API Help - Recognizing Features Automatically (VBA)

       

      This line "varOut = sample.RecognizeFeatureAutomatic(option )" doesnt work. VBA is giving me "Run-time error '91': Object variable or With block variable not set". This error is usually related to usage of Set in assigning the value. In the sample varOut is defined as a variant. Ive changed some different permutations, using set/changing varOut to long/etc. Nothing seems to work. Wondering if anyone has gotten this to work.