VBScript in AutoCAD Arch & MEP PSDs

VBScript in AutoCAD Arch & MEP PSDs

mdhutchinson
Advisor Advisor
763 Views
2 Replies
Message 1 of 3

VBScript in AutoCAD Arch & MEP PSDs

mdhutchinson
Advisor
Advisor

I was fritzin' around with some code I found that seems to work in AutoCAD MEP Formula PDS. I know that Formula Properties can use VBScript...

But below fragment looks like VBA...  Is it?

 

I am in 2011 and will soon be moving to 2012... I thought VBA is no longer supported by Autodesk, but is a separate download. If the below is VBA which I am assuming, how does this work?? ... is it that VBScript is actually a kind of a subset of VBA?

 

Assuming VBScript can run VB based code... Can someone point me to the latest documentation on VBA, The MEP (or at least AutoCAD) Object Model, Events, Properties and Methods?

 

 

Select Case AcadVerString
Set aecBase = acadApp.GetinterfaceObject(aecBaseVer)

aecBase.Init acadApp

Set Obj = AcadApp.ActiveDocument.HandleToObject("270C1")

blkname = Obj.EffectiveName

RESULT = blkname

0 Likes
764 Views
2 Replies
Replies (2)
Message 2 of 3

arcticad
Advisor
Advisor

it could be vba or vb.net code. it's just using COM(ActiveX).

VbScript has no object types, they are all variants so i don't think it would be very useful.

 

VBA is available in 2012, however that may be the last version. but we will see.

 

Your going to want to move to .net anyways as any new methods and properties will only be available via .net. 

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
Message 3 of 3

mdhutchinson
Advisor
Advisor

I had heard that VBA may be totally done away with in 2013 (if it gets that numberSmiley Mad )...

 

So you can use .NET in PropSetDefs Formula Properties in 2011 an 2012?

 

(I was there when r13 came out.  The company I was with lost 20 grand worth of drawing files)

0 Likes