From: Ronni on 31 Jan 2008 08:10 Hey - I am trying to make a macro that can delete all my custum properties (configuration specifik props) except those in the Default configuration. I am trying to do it manually by writing in all the names of the properties, but that aint really a good solution (I have around 30-50 different named properties and not all are present on all parts) Also I am trying to just take them from i=1 (instead of i=0, then presuming that default always gets the list value 0) So I need some input to do this in a better way, and not to make asumptions like the one above. Alternate I was thinking about dropping the default settings, deleting everything and then copying it back onto the Default config. So it looks similar to this (just with many more properties): Dim swApp As SldWorks.SldWorks Dim swmodel As SldWorks.ModelDoc2 Dim reval() As String Dim i As Integer Set swApp = Application.SldWorks Set swmodel = swApp.ActiveDoc reval = swmodel.GetConfigurationNames() For i = 1 To UBound(reval) swmodel.DeleteCustomInfo2 reval(i), "Modelnr" swmodel.DeleteCustomInfo2 reval(i), "Betegnelse" swmodel.DeleteCustomInfo2 reval(i), "Material" swmodel.DeleteCustomInfo2 reval(i), "sMaterial" swmodel.DeleteCustomInfo2 reval(i), "Mass" swmodel.DeleteCustomInfo2 reval(i), "Designer" swmodel.DeleteCustomInfo2 reval(i), "Edition" swmodel.DeleteCustomInfo2 reval(i), "Date" Next
From: That70sTick on 31 Jan 2008 08:30 I have a macro for deleting custom properties. <http://www.esoxrepublic.com/freeware/>
From: Ronni on 1 Feb 2008 03:25 Thanks for inspiration, looks good and seems to work well.
|
Pages: 1 Prev: SW2008-Error creating instance of MSXML2::DOMDocument Next: Cosmosmotion tutorial valvecam |