I'm having an issue with a COM object that outputs data into 2 variables. No matter what I try, the variables are created empty. Not sure if I am missing something syntax wise, or if this is something unsupported by AHK.
AutoCAD drawings support standard file properties such as "Title", "Author", "Revision" and so forth. They also support custom file properties, each being a "key" with a "value". These properties are all accessible via COM through the "SummaryInfo" object. Standard properties are retrievable, and editable. Custom properties are retrievable, editable and can be removed all together.
I can read and change all the standard properties just fine. Custom properties I can add, change and remove, but I cannot seem to read them.
There are two methods to do this.
By index
Code: Select all
aCAD := ComObjActive("AutoCAD.Application")
aCAD.ActiveDocument.SummaryInfo.GetCustomByIndex(0, key, value)
By key
Code: Select all
aCAD := ComObjActive("AutoCAD.Application")
aCAD.ActiveDocument.SummaryInfo.GetCustomByKey("key", value)
I feel like I am missing something simple here. I haven't had any issue utilising COM in AutoCAD until now.
I have also posted the question in the AutoCAD subreddit.
Thanks in advance.