-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not read attributes from block reference #6
Comments
I solved this by using win32com. In case anybody comes across the same problem (and wants to save a few hours of work): |
I just opened an issue for this in the comtypes package, on which pyautocad is based. @thengineer, if you can provide more information about the |
@cfarrow: That's good to know someone is working on COM related things :) |
I could test this out as well. I'll need AutoCAD, and so as much information that you can give me up front will help me make the most of a trial license. :) |
you will find the VBA Reference under The actual problematic things are the Attributes (= user definable key/value pairs) of the Blocks (or Block references actually). See my gist file posted above for how to access them with win32com. If you need help creating such a block or need an example file, let me know. |
@thengineer : Your workaround using |
Hi, I'm totally new in python (3 days) and I would like to create a program which rewrite block attributes. However, the script provided by thengineer (Here: https://gist.github.com/thengineer/7157510) doesn't work. I get this error (trying on Acad2017, drawing with only just one block with manualy defined block attribute): Traceback (most recent call last): Has anyone the same problem? |
Interestingly I came across the same issue a few months ago. I ended up checking the existence of attributes using python's |
Please tell me: How to Setup Module Win 32??? |
I'm trying to read block attributes:
Reading other properties works fine:
However, when I want to query the attributes (which I'm actually interested in), I get an error message:
Did some research on Google, but my knowledge of COM is just too low to help myself here..
The text was updated successfully, but these errors were encountered: