variables already filled in textbox

Discussion in 'AutoCAD' started by frank roegiers, Apr 9, 2004.

  1. Hi everybody,


    I am working on a routine to draw a concrete beam. So I have to fill in
    width, height and length of the concrete beam. Next time I draw another beam
    I want the width, length and height from the previous concrete beam already
    filled in in the textbox.

    How should I do this


    Thanks in advance

    Frank

    ps: I am quite new on vba, so this probably is a basic skill in vba
     
    frank roegiers, Apr 9, 2004
    #1
  2. There are a couple of ways.

    1. use can save for current session only by using one of autocad user
    variables. Some are saved with the drawing also

    ThisDrawing.SetVariable "useri1", 3 '(is an example)

    useri = intiger
    i can't remember the other ones, but there is one for a string also.


    2. use the SaveSetting and the GetSetting which save to the registry. You
    can see examples of these in the VBA help file.

    --

    Thanks,

    David M. Gardner
    Change the DOT to reply.
     
    David M. Gardner, Apr 9, 2004
    #2
  3. No, don't use the registry for startup options. Use an INI or XML file. The
    XML is preferable in this scenario but the INI will work too. Search the ng
    or www.codehound.com for examples. If you can't find anything, reply to
    this and I'll whip up an example for you.
     
    Mike Tuersley, Apr 10, 2004
    #3
  4. Actually, if you don't mind email me a copy of your program and I'll do the
    integration for you as part of my next CADalyst column - it'd mke a good
    article if you don't mind waiting a week or two for the solution. Let me
    know.
     
    Mike Tuersley, Apr 10, 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.