I would like to offset a surface a given amount, say 0.500", and then thicken this suface the same amount, back to the original surface. Is that something easily accomplished with a macro? Or....? Any ideas would be greatly appreciated.
You could simply record a macro and check/try that recorded macro.
I'm looking to do the same thing, but offset 0.00" then Thicken by .1" or another amount.
Recording a macro simply doesn't work. It only records clearing the selection.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Set swApp = _
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("", "FACE", -1.27903773701519E-02, -1.62559999999417E-02, 0.104853243076207, False, 1, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Surface-Offset13", "REFSURFACE", 0, 0, 0, False, 1, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureBossThicken(0.00254, 0, -1, False, True, True, True)
I found this:
2014 SOLIDWORKS API Help - CreateOffsetSurface Method (IBody2)
To do the above to the pre-selected surface, i think this is the info to do that:
2014 SOLIDWORKS API Help - Get Preselected Object Example (VBA)
Retrieving data ...