Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Sub SetAttributesOnSheets()

  Dim oDrawDoc As DrawingDocument
  Set oDrawDoc = ThisApplication.ActiveDocument
    
  Dim Blockname As String
  Blockname = "Testblock"

  Dim oSheet As Sheet
  For Each oSheet In oDrawDoc.Sheets
    Dim oBlock As AutoCADBlock
    For Each oBlock In oSheet.AutoCADBlocks
      If oBlock.Name = Blockname Then
        Dim tagStrings() As String
        Dim textStrings() As String
    
        oBlock.GetPromptTextValues tagStrings, textStrings
    
        Dim i As Integer
        For i = LBound(tagStrings) To UBound(tagStrings)
          If tagStrings(i) = "TEXT1" Then
            textStrings(i) = "text1text"
          ElseIf tagStrings(i) = "TEXT2" Then
            textStrings(i) = "text2text"
          End If
        Next
    
        ' If multiple tag strings are the same then it will
        ' only set the value for the first one of them
        ' That's one of the reasons for this article
        ' to show how to do it using the AutoCAD API instead
        ' which seems to be working fine and can be used as
        ' a workaround
        oBlock.SetPromptTextValues tagStrings, textStrings
      End If
    Next
  Next
End Sub

This is the closest reference,

adndevblog 

I've found but ilogic doesn't use SET (just remove?) & it doesn't like SUB's (must be after SUB MAIN) - remove subs & then more errors ..

 

 

Can this be ported to iLogic?