Consulting

Results 1 to 2 of 2

Thread: Autocad static block attributes

  1. #1

    Autocad static block attributes

    I can't get autocad static block attributes which equals to more than one digit.

    For example:

    Dim v As Variant
    Dim oBkRef As IAcadBlockReference

    v = oBkRef.GetAttributes
    xxx = v(0).TextString

    I need xxx to be the whole Attribute value, not just one digit of it.
    Here is my all code:

    Function maxi()

    Dim ent As AcadEntity
    Dim oBkRef As IAcadBlockReference
    Dim v As Variant
    Dim maxmax As Boolean
    maxmax = 0

    For Each ent In ThisDrawing.ModelSpace

    If ent.ObjectName = "AcDbBlockReference" Then
    Set oBkRef = ent
    v = oBkRef.GetAttributes

    If oBkRef.Name = "bl_mazgas" Then

    If v(0).TextString > maxmax Then

    maxmax = v(0).TextString

    End If
    End If
    Next ent

    maxi = maxmax + 1

    End Function

  2. #2
    VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    This is because maxmax is defined as a boolean instead of a string.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •