EBDN - Community - Question & Answers

  Friday, 23 August 2024
  3 Replies
  497 Visits
0
Votes
Undo
Hello,

I'm trying to set the style of a selected connection in a drawing (Sheet) to "Process." The manual steps for doing this are shown in the attached screenshot. Below is my code, but it's not functioning as expected.

My ultimate goal is to create a tool that loops through all connections with the "Normal" style and allows me to confirm, with a single click, whether each line should be changed to "Process" or not.

Could someone please help me with this? Thank you!


Sub LineStyleEB()

Dim oSheet As Sheet
Dim oItem As ObjectItem
Dim atParamData(1 To 3) As Aucotec.AucExecuteSheetRecord

Set oItem = Selection(1)

atParamData(1).qual = aucOpExecSheetSetLineStyle
atParamData(2).qual = aucArgExecSheetRef2Symbol
atParamData(2).Val = oItem.ID
atParamData(3).qual = aucArgExecSheetLineStyle
atParamData(3).Val = "Process"

Call Utils.ExecuteSheetOperation(oSheet, atParamData)

End Sub