VBA to ARX

VBA to ARX

Anonymous
Not applicable
428 Views
1 Reply
Message 1 of 2

VBA to ARX

Anonymous
Not applicable
I have a routine in VBA that needs its equivalent in ARX. Any idea how it can be done? Basically this routine reads system variables, in this case dimtxt, from another drawing without opening it and returns the value to the calling application.

Public Function getSystemvariable() as Double

Set objDbx = GetInterfaceObject("ObjectDBX.AxDbDocument.17")
Dim inDir As String
Dim filenom As String
Dim WholeFile As String
Dim dimTxtVar as Double

inDir = "c:\program files\autocad\test"
filenom = Dir$(inDir & "\*.dwg")
WholeFile = inDir & "\" & filenom
objDbx.Open WholeFile
dimTxtVar = objDbx.GetVariable ("dimtxt")
Set objDbx = Nothing
getSystemvariable = dimTxtVar

End Sub
0 Likes
429 Views
1 Reply
Reply (1)
Message 2 of 2

fenton_webb
Autodesk
Autodesk
0 Likes