I am trying to automate reading/writing of custom drawing properties using accoreconsole.exe.
The aim is to have something fully scripted, no dialogs, that can run as a background process.
I am new to autolisp and all examples I have seen involve:
(vla-get-ActiveDocument (vlax-get-acad-object))
However it seems like accoreconsole.exe does not support ActiveX functions.
I would be grateful for any tips on how to achieve both read and write of custom *.dwg properties.
Solved! Go to Solution.
Solved by JTBWorld. Go to Solution.
Solved by hak_vz. Go to Solution.
Thanks for the pointer!
I was hoping to find a scripted-solution, that would be more version independent (?)
I don't know in advance what AutoCAD version is installed on the target machine (but >2018) and the solution should accommodate that.
Loading a pre-compiled C# assembly means that I need to make some assumption on the target framework, or have one for each case.
Some precision about what I am trying to achieve using accoreconsole.exe on a DWG file:
'Header' Metadata
1. Read and output all custom drawing properties as a list of key/value pairs that can be easily parsed by the calling context
2. Write a list of key/value pairs as custom drawing properties and save the change to the same file (overwrite existing)
3. Delete a list of custom drawing properties by name (would run before 2., to ensure a clean slate if we decide to rename some properties)
Block Metadata
Achieve the same as above for a given block. Although I am not sure yet how best to identify the block.
It sounds like something basic but I am quite new to both ACAD and autolisp.
Thanks in advance for any advice 🙂
If you find the need to get help with this feel free to contact us. It's quite minor work so it should not cost much but needs to be done with .NET but same DLL will probably work for quite a few versions back and in the future.
@JTBWorld Isn't this post on your blog solution to his problem
https://blog.jtbworld.com/2010/05/propulate-tutorial-for-dwg-properties.html
Miljenko Hatlak
It might be to some extent.
Can't find what you're looking for? Ask the community or share your knowledge.