AnsweredAssumed Answered

Value Thickness from Equidations

Question asked by Franz Dahinden on Mar 4, 2019
Latest reply on Mar 5, 2019 by Franz Dahinden

This macro takes the value of the thickness from the properties. I want to link to the equation thickness. Is that possible? Option Explicit     Dim swApp              As Object     Dim swModel            As SldWorks.ModelDoc2     Dim swCustPrpMgr        As SldWorks.CustomPropertyManager     Dim nResponse          As Integer     Dim Value              As String     Dim Qty                As String     Dim FilePath            As String     Dim MTRL                As String     Dim swCustPrpMgr1      As SldWorks.CustomPropertyManager   Sub main()     Set swApp = Application.SldWorks        Set swModel = swApp.ActiveDoc        ' Check the document is a Part     If (swModel.GetType <> swDocPART) Then        MsgBox "Please open a Sheet Metal Part"         Exit Sub     End If    'Setting the Total Qty        Qty = InputBox("Enter Total Qty. in Number")     If Qty = "" Then     MsgBox "Please enter the total QTY"     Else 'Get Document Path     FilePath = Left(swModel.GetPathName, InStrRev(swModel.GetPathName, "\"))     FilePath = FilePath & "\WJ PROFILES\" 'Get Custom Property     Set swCustPrpMgr = swModel.Extension.CustomPropertyManager("")    swCustPrpMgr.Get3 "Thickness", False, "", Value          Set swCustPrpMgr1 = swModel.Extension.CustomPropertyManager("")     swCustPrpMgr.Get3 "Material", False, "", MTRL    'Export Flat Pattern     swModel.ForceRebuild3 False     swModel.ExportFlatPatternView FilePath & " " & swModel.GetTitle & " " & Value & " " & MTRL & " " & Qty & " " & "OFF" & ".DXF", 1 End If End Sub

Outcomes