Code Red > VB(A)
eattext and vba
Anton:
I use eattext a lot. I have the regular things to set like: current drawing and user template etc. These settings are always the same.
Is it possible to let a vb program set this automaticly? So I dont have to run through al those settings. Just run a vba and presto!
If not can this be done by a lisp program? (Or both vba and lisp?)
I'm new to vba so maybe it's a stupid question.
Anton
Keith™:
Anything is possible given you throw enough money, effort and time at it.
But seriously, there is a VBA program example that extracts attributes to excel that could be modified to do what you need, or you can create a custom routine, (lisp or VBA) to look at the drawing objects and filter what you want then extract only the information you want.
It won't be done in a few minutes, and it may take a few hours depending upon the complexity of what you want, but it can be done.
Anton:
I tried a few lisp files who do this thing. For me, the eattext function in acad works the best. Maybe i tried the wrong ones....
The goal is this:
I have a drawing with a few custom symbols.
Those symbols have some atrributes. A few invisible with preset data, and a few with channelnumbers wich I have to set when placing a block in the drawing.
At the end I want a list in Excel with a list of the blocks, the number of them, the weight (=preset), the height, order code(=preset) etc.
So far the eattext works great. Except I have to go through the same questions again and again with the same answers.
So that's why I want to skip the questions.
Hope you have a clue what I mean.
ML:
Hi There
I use eattxt occasionally as well and I agree with Keith
I think i know the exact example Keith is reffering too.
As my knowledge of VBA is still just above beginner, I had no luck modifying that example to make it mine. No doubt Keith could do it time permitting.
Anyhow, I do believe that The Extract Attributes (eattxt) not only has too many steps but you also have to bring the comma delimited text into Excel.
I did automate The Excel process with a macro but it is no where near the custom spread sheet that I want. I don't think that it would be that hard to create a macro in AutoCAD that would automate your process if you want to use The Eattxt Method
I intend to keep plugging until I can create my own spread sheet and with one click have the attributes extract and arranged in Excel EXACTLY how I want. I
Let's keep this topic alive until one of us figures it all out. It will benefit everyone I believe.
Mark
ML:
Hey Keith
I really hope you do not look like that in real life? :lol:
Navigation
[0] Message Index
[#] Next page
Go to full version