Constant Attributes

Discussion in 'AutoCAD' started by VBA, Sep 22, 2004.

  1. VBA

    VBA Guest

    Is it possible to change a constant attribute using code after it is
    inserted into a drawing?

    TIA
     
    VBA, Sep 22, 2004
    #1
  2. attributeObj.TextString
     
    Paul Richardson, Sep 22, 2004
    #2
  3. VBA

    VBA Guest

    Could you be a bit more specific?

     
    VBA, Sep 22, 2004
    #3
  4. First open Dev help menu and look up "getconstantattributes"
    will give general info on constant attributes and some samples

    'Select your block set to blkObj

    Dim attObj As AcadAttribute
    Dim blkObj As AcadBlockReference
    Dim varObj As Variant
    Dim strObj As String
    strObj = "My Changed Constant"
    varObj = blkObj.GetConstantAttributes'array of block Constants
    Set attObj = varObj(0)'choose constant in arrary
    attObj.TextString = strObj'set to new string...

    This should do it...If not let me know..
     
    Paul Richardson, Sep 22, 2004
    #4
  5. VBA

    VBA Guest

    Thanks!


     
    VBA, Sep 22, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.