Print Page | Close Window

How can I use getcfg in VBA ? PLEASE HELP

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=3032
Printed Date: 17.Apr.2026 at 13:44


Topic: How can I use getcfg in VBA ? PLEASE HELP
Posted By: sdtopo
Subject: How can I use getcfg in VBA ? PLEASE HELP
Date Posted: 17.Jan.2010 at 08:59
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
 



Print Page | Close Window