Hi,
I See this thread
It is interesting but what i want is to edit with my app developed in VB.Net to Edit some Custom Property without opening it in SW to save time on Execution At this Time I Work with this
Function EditDrawingProperties(DrawingToEdit As String)
Dim swDocSpecification As SldWorks.DocumentSpecification = swApp.GetOpenDocSpec(DrawingToEdit)
swDocSpecification.Silent = True : swDocSpecification.ReadOnly = False : swApp.OpenDoc7(swDocSpecification)
Dim Drawing As DrawingDoc = swApp.ActiveDoc
Dim swModel As ModelDoc2 = swApp.ActiveDoc
Dim swModelDocExt As ModelDocExtension = swModel.Extension
Dim swCustProp As CustomPropertyManager = swModelDocExt.CustomPropertyManager("")
swCustProp.Add3("LBM_DWG", 30, Regex.Match(DrawingToEdit, "N°([0-9]+)-0.SLDDRW", RegexOptions.IgnoreCase).Groups(1).Value, 2)
swCustProp.Add3("LBM_REV", 30, 0, 2)
swCustProp.Add3("LBM_REV1", 30, 0, 2)
swCustProp.Add3("LBM_DATE1", 30, Dateddmmyy, 2)
swCustProp.Add3("LBM_MEMO1", 30, "First Issue", 2)
swCustProp.Add3("LBM_ISSUED1", 30, User(), 2)
swCustProp.Add3("LBM_PROJECT", 30, DrawingToEdit.Split(New Char() {"\"c})(5), 2)
Drawing.ForceRebuild() 'Reconstruction
Dim fileerror, filewarning As Integer
swModel.Save3(SwConst.swSaveAsOptions_e.swSaveAsOptions_Silent, fileerror, filewarning)
swApp.CloseDoc(DrawingToEdit)
Return Nothing
End Function
But this take many times when i have 20 drawing and more and each one take a minute to open.
If anyone have an idea
SolidworksApi macros