AnsweredAssumed Answered

Can you write a Macro do delete and then add a specific appearance?

Question asked by Kray Shivers on Oct 16, 2014
Latest reply on Oct 16, 2014 by Daniel Andersson

I am wondering if it is possible to write a macro that would delete and existing appearance and then add a specific one? I have about 2000 parts that need their appearance changed and it would a big help if there was a way to do that. I have already tried recording my mouse click and it generated this code.


' ******************************************************************************
' c:\TEMP\swx4424\Macro1.swb - macro recorded on 10/16/14 by KrayS
' ******************************************************************************
Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

Set swApp = _

Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("6410-32-24-V8 - CTT2.SLDPRT", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
Part.ClearSelection2 True
Part.ClearSelection2 True
End Sub


but when you add it in to your tool bar and try to use it, it does nothing. My co-worker next to me did a quick Google search and didn't come up with anything. Anything would be helpful and much appreciated.