I have a VBA script for AutoCAD Electrical and I want to write something to the drawing propertie 'Description 1', see picture. But, I can't find out how to acces this specific propertie. I can acces properties like 'Project Code' and 'Sheet'. I can acces those properties with 'IEC_PROJ' and 'SHEET' in my VBA code (Example: If .TagString = "SHEET" Then). They are members of the 'WD_M' block?!
So, can someone please tell me how I can acces the propertie 'Description 1' with a VBA script??
Thank you very much.
This information resides in the .wdp file.
It is not stored in the WD_M block like the other items you mentioned. If you want to modify the DESC# values, you will need to somehow access the .wdp and then force a titleblock update to "push" the data to the drawings.
I wrote a .lsp program to comcatentate these values in the drawing which required that I add 3 new attributes to the titleblock for DESC storage. I was thinking about writing a program to access the .wdp and extract the DESC values from the drawing and put them into the .wdp but never got around to it.
Maybe this might help you...
Thank you for your answer and .lsp program.
Do you think/know this is the only way to do this? What do you mean with: 'Force a titleblock update'? I mean, which titleblock do I have to update?
If I understand you, all the descriptions for each drawing must be stored in the .wdp file? And what about the 'default.wdt' file? It is possible to mapping some attributes there isn't it?
The data from the .wdp does not automatically get inserted into a drawing when the .wdp is editted. YOu have to do a Titleblock update. WHen I say "force" I just mean that whatever program you create will have to do a titleblock update to push the changes to the drawings.
I do not use the default. wdt file. I have a WD_TB attribute in each drawing that hold this info.
Either format controls how information is sent to the drawing from the project and drawing properties windows.
I've managed to add the descriptions to the drawing properties. In the Autodesk API Reference, section G - Project Management, there is a 'ace_add_dwg_to_project' function. With this function you can set 'Drawing Descriptions'.
I will definitely have to check that out. I often want to be able to set Rev values on the sheet on a per drawing basis and this sounds like what I need.
I misread this. I thought I would be able to add more DESC lines to an existing drawing, not fill in the 3 DESC lines.
Back to the drawing board...
I´m not sure what version of ACADE you are using but I think that from version 2011 you can export the drawing settings to an Excel file and edit the description for each drawing and then re-import them back to your project (see attached image) very appreciated feature indeed
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.