SetXRecordData

Discussion in 'AutoCAD' started by Dale Levesque, Jun 2, 2004.

  1. Could someone supply the bare bones hard code method to use SetXRecordData
    to store data in a drawing withthe following req's.

    Dict Name is "Test"
    Dict Key is "Key"

    First store an array of the following ("1" 1.06 2.5) ' a string and two
    doubles

    Then modify the data to keep the existing array but add another to it like
    this (("1" 1.06 2.5) ("2" 3.5 6.0))

    Help!!

    Best regards,

    Dale
     
    Dale Levesque, Jun 2, 2004
    #1
  2. I tried this but it has a problem with the arguments.

    ReDim fv_BrickDataType(0 To 2)
    fv_BrickDataType(0) = 1
    fv_BrickDataType(1) = 38
    fv_BrickDataType(2) = 39
    ReDim fv_BrickData(0 To 2)
    fv_BrickData(0) = "1"
    fv_BrickData(1) = 1.0
    fv_BrickData(2) = 2.0

    Dim dic As AcadDictionary, xrec As AcadXRecord
    On Error Resume Next
    Set dic = lo_Drawing.Dictionaries(DICTIONARY_NAME)
    If Err Then
    Err.Clear
    Set dic = lo_Drawing.Dictionaries.Add(DICTIONARY_NAME)
    End If
    On Error GoTo 0

    Set xrec = dic.AddXRecord(XRECORD_BRICK)
    xrec.SetXRecordData fv_BrickDataType, fv_BrickData '''' No Good here
     
    Dale Levesque, Jun 2, 2004
    #2
  3. Check out my reply in your other thread. You need to use group codes 40 &
    41, not 38 & 39.

    --
    R. Robert Bell


    "Dale Levesque" <dale at dynamicwindows.com> wrote in message
    I tried this but it has a problem with the arguments.

    ReDim fv_BrickDataType(0 To 2)
    fv_BrickDataType(0) = 1
    fv_BrickDataType(1) = 38
    fv_BrickDataType(2) = 39
    ReDim fv_BrickData(0 To 2)
    fv_BrickData(0) = "1"
    fv_BrickData(1) = 1.0
    fv_BrickData(2) = 2.0

    Dim dic As AcadDictionary, xrec As AcadXRecord
    On Error Resume Next
    Set dic = lo_Drawing.Dictionaries(DICTIONARY_NAME)
    If Err Then
    Err.Clear
    Set dic = lo_Drawing.Dictionaries.Add(DICTIONARY_NAME)
    End If
    On Error GoTo 0

    Set xrec = dic.AddXRecord(XRECORD_BRICK)
    xrec.SetXRecordData fv_BrickDataType, fv_BrickData '''' No Good here
     
    R. Robert Bell, Jun 2, 2004
    #3
  4. Many Thanks. That one was frustrating.

    Best regards,

    Dale Levesque
     
    Dale Levesque, Jun 2, 2004
    #4
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.
Similar Threads
There are no similar threads yet.
Loading...