Message 1 of 7

Not applicable
05-05-2020
10:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
In my iLogic rule in a drawing, I need to delete 25 sketch symbols if the boolean from the assembly is false. Only if I run the rule the sketch symbols will not be deleted.
I guess that the string test can't deleted the SketchSymbol as the rule counts up with 1.
I hope that own of you can help, thanks in advance.
Sub Main() ''Path to document file doc = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName) Dim oSketchedSymbolDef As SketchedSymbolDefinition ''Searching for a symbol in active sheet For Each oSymbol In ThisDrawing.Document.ActiveSheet.SketchedSymbols i = i + 1 ''count up i, with plus 1 If i < 10 Then t = "0" Else t = "" If i = 26 Then ''exit loop if more then 25 stops Exit For End If ''MsgBox(i & " - " & t) Dim test As String test = ("StopNummerPeilmaat" & i) If Parameter(doc, ("FFrontDoor_" & t & i)) = "False" Then ''If name symbol is True/Flase then delete sketchsymbol ;o If oSymbol.Name = test Then oSymbol.Delete End If End If If Parameter(doc, "FBackDoor_" & t & i) = "False" Then If oSymbol.Name = test Then oSymbol.Delete End If End If Next End Sub
Solved! Go to Solution.