Can someone tell me how to make a newly added part Virtual?
Here is a pretty simple code that adds a VirtualBlank part in the assembly. I just need to make it virtual. And if anyone knows how to rename it.
Dim swApp As Object
Dim bool As Boolean
Set swApp = Application.SldWorks
Set swAssemblyModel = swApp.ActiveDoc
' Check to see if a document is loaded
If swAssemblyModel.GetType <> 2 Then
swApp.SendMsgToUser ("Please make sure assembly model is open and active.")
bool = swAssemblyModel.AddComponent("w:\SolidWorks Files\SWFiles\Parts\VirtualBlank.SLDPRT", 1, 1, 1)
' Make the component virtual
'stat = bool.MakeVirtual
Set swApp = Nothing
Can someone help?