Hello
I have a solidworks macro that works fine when I launch the solidworks macro.
I'd like this macro to be wired into our EPDM feed via Solidworkstask add-in.
Here is my macro, it is used to lower the block bar on a part file.
Dim swdoc As SldWorks.ModelDoc2
Dim swAllDocs As EnumDocuments2
Dim FirstDoc As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim NumDocsReturned As Long
Dim DocCount As Long
Dim swapp As SldWorks.SldWorks
Dim longstatus As Long
Dim part As Object
Sub FREEZE_ONE()
Set swapp = _
Application.SldWorks
Set part = swapp. ActiveDoc
If (UCase(Right(part. GetPathName, 6)) = UCase("sldprt")) Then
boolstatus = share. FeatureManager.EditFreeze(swMoveFreezeBarTo_e.swMoveFreezeBarToEnd, "", True)
part. SaveAs (part. GetPathName)
End If
End Sub
I pasted it into the script tab of the task
The macro does not run.
Where can this come from?
Do you know how to do it?
Thank you in advance for your feedback
Yannick
2020_03_04_22_10_03_nouvelle_tache_proprietes.png