get/set custom DWGPROPS using accoreconsole.exe

get/set custom DWGPROPS using accoreconsole.exe

olivier.doucet
Participant Participant
2,241 Views
7 Replies
Message 1 of 8

get/set custom DWGPROPS using accoreconsole.exe

olivier.doucet
Participant
Participant

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.

 

0 Likes
Accepted solutions (2)
2,242 Views
7 Replies
Replies (7)
Message 2 of 8

ВeekeeCZ
Consultant
Consultant

Very recently HERE  

0 Likes
Message 3 of 8

olivier.doucet
Participant
Participant

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.

0 Likes
Message 4 of 8

olivier.doucet
Participant
Participant

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 🙂

0 Likes
Message 5 of 8

JTBWorld
Advisor
Advisor

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.  


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 6 of 8

ronjonp
Mentor
Mentor

If you are trying to get summary info have you thought about using ODBX? It's super fast 😎

0 Likes
Message 7 of 8

hak_vz
Advisor
Advisor
Accepted solution

@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

EESignature

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.
0 Likes
Message 8 of 8

JTBWorld
Advisor
Advisor
Accepted solution

It might be to some extent. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes