Results 1 to 2 of 2

Thread: How can I use getcfg in VBA ? PLEASE HELP

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2009-05
    Posts
    1

    Default How can I use getcfg in VBA ? PLEASE HELP

    I am trying to pass information from vba to autocad using the acad.cfg file.

    I use the following syntax:

    Dim zzGetVarzz as String

    ThisDrawing.SendCommand "(setvar ""USERS1"" (getcfg ""AppData/SDTOPO/StringForTitle""))" & vbCr

    zzGetVarzz = AutoCAD.Application.ActiveDocument.GetVariable("USERS1")

    This works OK only if i use it one or two times within the Sub.
    I need to call this syntax over 80 times within the same Sub and when i run it it seems command line gets confused (synchronising issues) with so many commands and does not work rigth.

    If anyone could give an example of how to use "Autocad.Application.Prefernces.property property"
    which is the comparision of getcfg in vba (whithout using sendcommand).

    Thank you in advance.
    Please help

  2. #2
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: How can I use getcfg in VBA ? PLEASE HELP

    The cfg file is not designed for that purpose. There are many methods of writing data and many places to store it to. First, what are you trying to accomplish? Notice I say 'what' not 'how'.
    C:> ED WORKING....

Similar Threads

  1. Equivalent of setcfg & getcfg
    By csgohjmj in forum AutoLISP
    Replies: 5
    Last Post: 2005-04-18, 11:31 PM

Posting Permissions

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