Autocad, VBA, & Access (#2)
Autocad, VBA, & Access (#2)
(OP)
From the thread here: http://www.tek-tips.com/viewthread.cfm?qid=1395632, I thought this may be a good place to post a similar question regarding the use of VBA to extract information from an Access database. Although that post (and linked procedure) are helpful for a start, it doesn't cover my problem which is block tables in dynamic blocks.
I have a note bubble that is a dynamic block. Inside this block is a Block Properties Table that lists all the various parts we use. It's handy because I can use one of the columns in the database to create categories, which in turn makes flyouts in the dynamic block.
I am unsure how to link this Block Properties Table to the Access database I use to populate the table. As of now, I simply open up the database and open the note bubble in the block editor, select all of the records in the database and copy/paste them into the table in the block editor. Very inefficient.
Any help to get me going in the right direction would be fantastic. I appreciate it.
-stu
I have a note bubble that is a dynamic block. Inside this block is a Block Properties Table that lists all the various parts we use. It's handy because I can use one of the columns in the database to create categories, which in turn makes flyouts in the dynamic block.
I am unsure how to link this Block Properties Table to the Access database I use to populate the table. As of now, I simply open up the database and open the note bubble in the block editor, select all of the records in the database and copy/paste them into the table in the block editor. Very inefficient.
Any help to get me going in the right direction would be fantastic. I appreciate it.
-stu
RE: Autocad, VBA, & Access (#2)
You'll need to dig deeper in the dynamic block object and use the
GetDynamicBlockProperties of your Block Reference. Then, just as you would walk a set of attributes, you'll walk this set of DynamicBlockProperties looking for .PropertyName and either setting or getting .Value.
Sorry, I haven't worked with dynamic blocks yet to do what you're trying to do, but hopefully, that'll get you going.
BTW - my information is coming from Acad2012 - not sure how far back they starting supporting this, so YMMV...
Good Luck!
Todd