store a list of numbers in dwg

Discussion in 'AutoCAD' started by gert, Sep 13, 2004.

  1. gert

    gert Guest

    i would like to store a list of point numbers in a dwg. acad user
    variables should not be used, because of conflicts with other programs
    which already use these variables.
    at the moment i think i have to make a block with no entities but an
    invisible attribute, where i could store my list, could there be a
    problem with the length of the attribute (up to 5000 characters should
    be possible) and this attribute should be a list, because of using
    member-function would make t easy to use in my prog) easier.
    is there an easier way to do that? (eg store a selection set in the dwg?)

    i am using acad2000
    any help welcome

    mfg
    gert
     
    gert, Sep 13, 2004
    #1
  2. Have you considered using an external ascii file (.txt, etc), using an excel
    spreadsheet or a database? That way the file can be of any length. Reading
    and changing would also be easier.

    If you go the invisible attribute route, you could store the coordinates
    with delimiting characters (example - a comma between x,y,z and a semi-colon
    between sets of points). You could then use a number of programs posted here
    (gettextlist is my example) to read the long character string, parse the
    text to strings of x,y,z data. Then you parse the x,y,z text strings to
    point values.

    Another alternative to blocks with invisible attributes is to add extended
    data to objects.

    I don't know of any way to store a selection set other than to create groups
    that can be processed. But someone else might have a trick or two.
     
    Alan Henderson @ A'cad Solutions, Sep 13, 2004
    #2
  3. I think you may want to take a look at ( vlax-ldata-put/get/list ). This function is made espacially for storing Lisp data in the drawing dictionary.

    Acessing the data is faster than looking to an external file and the data always goes where the drawing goes. As well, it can't be modified by users unless they know they dictionary name AND the key name.

    I've been using it for about a month now and I haven't encountered any data limits yet and I've stored the equivalent of about a 200k ASCII file in dictionary keys.

    However, I don't know if you can store selection sets, but from what I've seen so far, I would guess that you can. I'm going to give that a try to see.
     
    Nick_Merchant, Sep 13, 2004
    #3
  4. gert

    gert Guest

    thanks for your help. i will have a look at the problem over weekend.

    mfg
    gert
     
    gert, Sep 14, 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.