AnsweredAssumed Answered

Linear Pattern Variable InsertVaryInstanceOverride is not taking

Question asked by Danny Bradford on Mar 30, 2016
Latest reply on May 23, 2016 by Danny Bradford

Greetings all,

I am attempting to create a Linear Pattern and override a few of the spacings but no matter what I do it does not take. Can anyone point me in the correct direction?

 

Solidworks 2015 SP02

 

The boolstatus in the message box comes back True but it still does not alter the linear pattern.

 

Code:

swApp = GetObject(, "SldWorks.Application")

        swModel = swApp.ActiveDoc

        swAssembly = swModel

        swModel = swApp.ActiveDoc

        swAssembly = swModel

 

        swFeatureManager = swModel.FeatureManager

 

        boolstatus = swModel.Extension.SelectByID2("Axis1@" & orig_pin.Name2 _

                                                   & "@" & Assemblyname, "AXIS", 0, 0, 0, False, 2, Nothing, swSelectOption_e.swSelectOptionDefault)

        boolstatus = swModel.Extension.SelectByID2(orig_pin.Name2 & "@" & Assemblyname, "COMPONENT", 0, 0, 0, True, 1, Nothing, swSelectOption_e.swSelectOptionDefault)

 

        boolstatus = swFeatureManager.InsertVaryInstanceIncrement("Space Increment", 2, 2, 0, 0.0125)

 

        boolstatus = swFeatureManager.InsertVaryInstanceOverride("Space Increment", 2, 2, 0, 1, 1, 0.0549)

 

        MsgBox(boolstatus)

 

        swFeature = swFeatureManager.FeatureLinearPattern3(3, 0.0253, 0, 0, flip, False, "NULL", "NULL", False, True)

 

        errors = swModel.EditRebuild3()

Outcomes