AnsweredAssumed Answered

Disable FeatureWorks warnings in macro

Question asked by Mart Müllerbeck on Jun 12, 2019

Hi

 

I have approximately thousand SW files that I want to regenerate with recognize features tool. I have managed to find a macro and majority of it runs as needed. Problems start when features recognition can't create features and prompts warning, because somebody needs to press "the button" before program can go to next part.

 

How to disable this warning box?

 

 

Macro that I use with #Task is:

 

 [CODE]

Dim Name As String
Dim value As ModelDoc2


Dim swApp As SldWorks.ISldWorks
Set swApp = Application.SldWorks
Set Part = swApp.IActivateDoc3(Name, False, 0)

boolstatus = Part.EditRebuild3()
boolstatus = Part.ForceRebuild3(True)
longstatus = Part.ImportDiagnosis(True, False, True, 0)

retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetCreateNewPart 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAllowFailedFeatureCreation 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetBodyCheck 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAddConstraintsToSketch 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetEnableAutoDimOption 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetDimensionScheme 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetHorizontalPlacement 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetVerticalPlacement 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetPerformBodyDiff 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetExtractFeaturesOnOpenPart 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAllowWizardHoleRecognition 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetCombineFilletsAutomatic 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetCombineChamfersAutomatic 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetCombineHolesAutomatic 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetFeatureIntrusionCheckOption 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetEFLocalRecognitionPromptOption 0")

retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAutomaticFeatureRecognition 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetInteractiveFeatureRecognition 1")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "RecognizeFeatures")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAutoDimOptions 1 0 0 0")
retval = swApp.CallBack("fworks@FWPlaybackManager", 0, "SetAutoRelOptions 1")
Application.SldWorks.ActiveDoc.Extension.RunCommand -2, ""

DoEvents

Name = Part.GetTitle
longstatus = Part.SaveAs3(Name & ".SLDPRT", 0, 2)

 [/CODE]

Outcomes