@mdhutchinson wrote:
I am needing some help with accessing Object Model from Property Set Definitions... I've have done some in the past but I need a help file with the Object Model and its Methods, Properties, and Events...
(Although I don't believe the area of Prop Defs can use or act on Events.)
Can anyone point me to where I can get some help?
http://cadengineeredsolutions.com/undocumented-property-set-definitions-continued/
http://cadengineeredsolutions.com/category/property-sets/
http://blog.jtbworld.com/2007/01/adt-window-style-type-in-psd.html
I believe that the information that you are looking for can be found in the VBA editor inside of Autocad MEP. You might have to download it if you have not done so already. A simple web search will return the download link.
Once you have fired up the editor, go into the tools menu and select references. From there you will need to add a reference to the files that you will be looking at. A good one would be the AEC Base 7.5 Application Library. There might be several versions of the file that you wish to look at. You will need to match up the version of the file with the version of Autocad that you are using. You can use the link you posted to my outdated blog above to match the file version with the Autocad Version.
Once you have a reference to a file you can then go into the View Menu and select Object Browser. In the upper left side of the dialog you can choose from the dropdown which file you would like to browse or you can just browse the entire library. It is this dialog that will show you all of the methods and properties.
While it is possible to use these items in property set formulas as i have shown in my blog, i would instead recommend that you continue to transition to either vb.net or c#. It is much more powerful and will allow you greater control over what you can do with the property sets. It is true that the learning curve is much steeper and that it takes many more lines of code to do the same thing that one line of code in lisp or vba might do but in the long run it will be more beneficial.
The AutoCAD MEP/Architecture API has a full compliment of property set methods that will allow you to manipulate the information in any way you choose. You can also create property sets on the fly but i have found that formula based property definitions are slow to create using code. It is better to just create a master style drawing and clone the property set definition from one drawing to another.
I will warn you however that this is precious little information regarding the MEP or Architecture API. The new ADN blogs do help but there should be more information available from autodesk. To put it bluntly, their .net API is pretty horrible for autocad verticals.
Good luck and feel free to message me if you would like more information on .net. With .net i have created an app that allows you to customize the information that you see in a tooltip for architecture and mep items. It uses property sets to display information about the object. So in short, if you can get the information inside of a property set then you can display it in a tooltip. The resulting tooltip look and feels just like the real thing. Below is a screenshot of the tooltip.
