TheSwamp

Code Red => VB(A) => Topic started by: deegeecees on October 10, 2005, 10:54:07 AM

Title: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 10, 2005, 10:54:07 AM
I used to have a chunk of code that made use of ObjectDBX, setting the value of a predefined attribute in selected drawings. It appears I have lost it. It was made available to me from *cough* the llama, I used it a couple of times but never really had the time to persue any worthwhle application with it. Now, I do. Is there anyone here that has knowledge of ObjectDBX that can help me out?
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 10, 2005, 12:27:50 PM
Never mind, I found it.

Any other help would be appreciated though. Go ahead chime in. Really, it won't hurt.
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on October 10, 2005, 01:00:38 PM
Since you found it, what kind of additional help would you like?
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 10, 2005, 01:10:11 PM
Since you found it, what kind of additional help would you like?

Anything objectdbx related. Just getting ideas for now.

Input.

I do alot of "Specialized" apps for our clients based on their "Standards", and usually when I go looking for something in particular, I find 10 other things that I "flag" for future reference. Thats what I'm doing now.
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on October 10, 2005, 02:03:34 PM
OK, first of all have you read my Introduction to ObjectDBX (http://www.theswamp.org/forum/index.php?topic=6697.0)? It may answer some of your questions.

Second, since you can do nearly everything with an ODBX document that you can with a drawing opened in Acad, I think you need to be more specific in what you'd like info on.

I'd be more than happy to help, but saying "I want to build a building, what can I do?"is far different than "I want some info on how to build a log cabin in the woods down by the lake. Do you have a suggestion on what government agencies I would need to talk to? Or how about log suppliers?"  :-)

And, sorry, but I cannot recall if you are a novice coder or are more advanced.

Jeff
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 10, 2005, 03:11:50 PM
Thanks Jeff,

I will give it a read, and sorry for the vagueness, I'm really just trying to find some ideas of where I can apply the things I know, and the things I'm finding out. As in, one of the clients we have has a certain standard of how to fill out the description portion of the revision block in their supplied title block. I'm taking text from an ASCII file and filling in the revision/description/drafter/engineer, all or some of these attributes with ODBX. Just one example.

As far as my coding knowledge, I'm just a Hack. I've coded some major apps, using Lisp, VBA, and some menu Diesel, all orchestrated to do what they need to at the time they need to do it. But with no formal training, I'm not sure how someone with an expert status would critique it. One example would be my "Drawing Tracker" I made for a client. It's just basicall titleblock information tied to a database, with tracked editing time, plotting statistics, revision tracking, and more. This is a mess of code that just seems to keep on working.
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 10, 2005, 03:17:14 PM
Ok, done. Whens the next article?
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on October 10, 2005, 04:17:13 PM
This is a mess of code that just seems to keep on working.
Sounds like most of my stuff.... :-)

The 'next' article never came to fruition due to a seeming lack of interest from users and a severe lack of time on my part. And, although that article was read nearly 2000 times at the 'other' site, I recieved leas than a handful of comments about whether it helped, or not. Kinda hard to get enthused when noone cares.....

Your use of the ASCII file seems logical to me. Were you trying to improve this or just providing the example of what you are now doing?
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 11, 2005, 11:44:41 AM
Quote
Your use of the ASCII file seems logical to me. Were you trying to improve this or just providing the example of what you are now doing?

I'm trying to DO this.

Pseudo Code:

Sorry for the lateness of my response, just got some bad news yesterday and had to run out.
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on October 11, 2005, 12:19:30 PM

I'm trying to DO this.
I'll see what I can whip up in a bit.....

Quote from: deegeecees
Sorry for the lateness of my response, just got some bad news yesterday and had to run out.
No problem, I hope it's not too bad.....
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 11, 2005, 01:11:28 PM
I'm working on re-populating the text boxes with the last filled in info.

- open text file
- set var1 to first line, var2 second line, so forth
- send info to text boxes upon dialog show
- user updates text, clicks OK
- send info to text file
- fill in atts via objectDBX

We get alot of repetition here, so I'm working towards using "last" filled in info on all my code (batch plot, ECR#'s etc.) using a sort of INI file based on user login text.

Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 11, 2005, 01:13:49 PM
Oh, yeah the bad news was extremely difficult to wrap my mind around. A freind of mine stepped in front of a train.
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 12, 2005, 12:18:24 PM
Well, it turns out he was intoxicated and stumbled. Thats what the police report says. I really feel bad for his family, he was such a mild mannered person. This happened in Fla. while he was visiting his mother, and the family doesn't have alot of funding so, I won't be attending the funeral, which is being held there in Fla.
Title: Re: Setting Att Strings w/Objectdbx
Post by: MP on October 12, 2005, 12:59:12 PM
That's terrible news, I'm so very sorry to hear this.
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 12, 2005, 01:16:38 PM
Thanks MP.

I went to High School with him, usually saw him a few times a year or so for the past 21 years. His sister lives 2 doors down from me. They're not taking it well.
Title: Re: Setting Att Strings w/Objectdbx
Post by: MP on October 12, 2005, 01:30:58 PM
It's one of the few certainties in life, yet we're never prepared for the loss of a friend or loved one. Our thoughts and prayers will be with you and his family.
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 12, 2005, 01:43:00 PM
Thanks again.
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on October 12, 2005, 02:49:00 PM
I would like to extend my condolences as well.

Let me know when you are ready to tackle the ObjectDBX coding again.

Jeff
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 12, 2005, 02:50:45 PM
No, problem JM. I'm taking off for today, and tomrrow looks chock full o grunt work, but I'll find some time in there, thank you for the help.  :-)
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on October 27, 2005, 01:27:51 PM
Update on my freind: There will be a Memorial this Saturday for Bruce Moak, for those of us (me and my freinds of course) who could not make it to Florida. I know it may seem callous, or I may just be in denial, but all I'm thinking about is how am I gonna fit this in between Halloween Parties, and Haunted Houses? Is that wrong?  :-(

Update on ObjectDBX app: Priority change! Need app for automating transmittals, starting thread in "Job Junk".
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on January 10, 2006, 11:11:57 AM
Anyone have something that will browse for folder, then process and update an attributed block within the dwgs of that folder?
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on January 10, 2006, 11:30:45 AM
What is the name of the block? Would you want sub-folders included? Where should the txt file be located, with the drawings or in a global location?
Title: Re: Setting Att Strings w/Objectdbx
Post by: T.Willey on January 10, 2006, 11:40:42 AM
Jeff,

Does VBA  have the same problem with Attributes and ObjectDBX as Lisp does?
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on January 10, 2006, 11:47:05 AM
block names are:

11x8
17x11
24x18
36x24
42x30
8x11

And the name of the Attribute Tag is DCode

I've been screwing around with ODBX in my "spare" time but haven't been able to come up with anything original. What I have now will process every attribute in a given block, prompting you for each tag found. Not what I'm looking for, I just want to be able to pick a directory, fill in a text box for the correct attribute value, and have the code process each drawing in that directory, looking for any one of the above blocks, find it, then find the attribute tag "DCode", then give it the value taken from that textbox.

Simple huh? Thanks for the quick response Jeff!
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on January 10, 2006, 12:32:52 PM
Tim, Yes.......(ActiveX is ActiveX, whether in Lisp or VBA or VB)

DGCs, you're welcome. I was going to be able to spend some time on this, but I was just handed a rush survey job. I'll be out until later this afternoon (it's 9:30 am here).
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on January 10, 2006, 01:02:17 PM
Jeff,
No problem. I just made a Lisp routine that handled it pretty well w/o using ODBX. The only thing is you have to sit and watch as AutoCAD opens and closes about 90 dwgs and if the users processor runs out of RAM (LARGE! dwgs), BOOOOT!. Which is why I was wanting to go the ODBX route. Don't really mind the justification glitch that comes with it, so if you're still interested I still would like to persue this, just not on such a frantic level as this morning.

Thanks again,

Patrick
Title: Re: Setting Att Strings w/Objectdbx
Post by: Jeff_M on January 10, 2006, 06:08:11 PM
OK, Patrick.
Attached is a DVB file that I pieced portions from another similar project I did. I have not tested the actual opening/editing/saving of the drawings, as I don't have the blocks that you are using. I do think that it should work with some minor tweaking.

Give it a try on a small, backed up, folder first!

Since you know some VBA, you may be able to make any adjustments needed. If not, just let me know what the error(s) is/are. Also, it wouldn't be too hard to add in additional attributes and to place/read the default data to a file, since that was one of the original requirements.

Jeff
Title: Re: Setting Att Strings w/Objectdbx
Post by: deegeecees on January 11, 2006, 12:50:09 PM
You da man Jeff! Downloading and tweaking, will post aftermath.