Automating Field Updates in AutoCAD with VBA and Excel: Offline File Updates

Automating Field Updates in AutoCAD with VBA and Excel: Offline File Updates

ThyagoVicent
Contributor Contributor
436 Views
2 Replies
Message 1 of 3

Automating Field Updates in AutoCAD with VBA and Excel: Offline File Updates

ThyagoVicent
Contributor
Contributor

Hello everyone, how are you?

I am creating a parameterization with Excel (VBA) and AutoCAD, in which in AutoCAD I have "Fields" linked with VBA. In the Files column, the location of the AutoCAD file is entered and in the columns next to it, the data for each linked Field is entered, as in the attached image. However, for this to occur, the AutoCAD files need to be open for the change to be completed. However, I would like to make these changes with AutoCAD closed, so that I can make the changes and they are saved in the files without having to open them. I would like to know if this is possible to do with just VBA.

ThyagoVicent_1-1723419095002.png

 

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

Ed__Jobe
Mentor
Mentor

It's impossible to make changes to ANY file without opening it in write mode. However, you can open the dwg in a "side database" that is not visible. It's much quicker. Search this forum for AxDbDocument for some sample code.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 3

grobnik
Collaborator
Collaborator

@ThyagoVicent 

Hi, due to the application capture my attention too, for a personal similar project, if you can share a sample dwg with field and the excel form where field info will be retrived I'll try to make some example code for you.

On the opposite if you already have some code please share with the forum, perhaps somebody here already approach some part that could be useful for you.

Bye

0 Likes