Author Topic: My attribute extraction program  (Read 3610 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
My attribute extraction program
« on: November 30, 2007, 06:22:20 PM »
Been working on it of a little while.  It was fun, and taught me some new stuff about C#.  Comments welcomed.

Right now it will export all the attribute values, for the tags selected, for all the block references within the current drawing to a tab delineated text file.  But could be changed to work with drawings not opened in the editor, or set to current within the editor.  Couple of pic's added to show the 'simple' dialog.  :-D  Code attached as it's too long to be pasted in the message.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Glenn R

  • Guest
Re: My attribute extraction program
« Reply #1 on: November 30, 2007, 06:39:29 PM »
Tim,

The dialog colours shown in your screen captions - are these the result of your colour preferences in windows or are they what you applied to your dialog specifically in Visual Studio/Sharp Develop to give it that look in the piccies?

Cheers,
Glenn.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: My attribute extraction program
« Reply #2 on: November 30, 2007, 06:54:35 PM »
Tim,

The dialog colours shown in your screen captions - are these the result of your colour preferences in windows or are they what you applied to your dialog specifically in Visual Studio/Sharp Develop to give it that look in the piccies?

Cheers,
Glenn.

I assigned them with the code.  I just like how they show up on my screen (easy to read, and not hard on the eyes), so for all my dialogs those are the colors I use.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Glenn R

  • Guest
Re: My attribute extraction program
« Reply #3 on: November 30, 2007, 07:00:20 PM »
Tim,

Are the programs you write for use by yourself only, or are they used by the company at large?

Cheers,
Glenn.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: My attribute extraction program
« Reply #4 on: November 30, 2007, 07:04:36 PM »
Tim,

Are the programs you write for use by yourself only, or are they used by the company at large?

Cheers,
Glenn.
Right now, only myself.  But I show others the code to use/modify/abuse as they like.  They are the people who get paid to write code for our company.  I just do it when I need something (usually Lisp), or for a learning experience (C#) in the few minutes between my 'real' work.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: My attribute extraction program
« Reply #5 on: December 01, 2007, 06:15:54 AM »
Why do you ask Glenn?  You have peaked my interest now.  :-)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Glenn R

  • Guest
Re: My attribute extraction program
« Reply #6 on: December 01, 2007, 01:30:00 PM »
Tim,

I was merely going to say, that you should design your UI to look and act exactly the same as the AutoCAD UI. The rule I follow is that if there is no precedent in AutoCAD, UI wise, then I won't do it.

However, seeing as you're doing it for yourself, that's a different story, but I would still suggest that you follow the standards, per se.
I'll have a look at your code file on Monday and see what I can see  :-)

By the way, are you aware, that AutoCAD provides an attribute extraction command and more recently, an enahanced attribute extraction command called EATTEXT as part of the core commands?

Cheers,
Glenn.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: My attribute extraction program
« Reply #7 on: December 01, 2007, 04:04:11 PM »
Tim,

I was merely going to say, that you should design your UI to look and act exactly the same as the AutoCAD UI. The rule I follow is that if there is no precedent in AutoCAD, UI wise, then I won't do it.
I see your point.

However, seeing as you're doing it for yourself, that's a different story, but I would still suggest that you follow the standards, per se.
I'll have a look at your code file on Monday and see what I can see  :-)
Thanks for taking a look at the code.

By the way, are you aware, that AutoCAD provides an attribute extraction command and more recently, an enahanced attribute extraction command called EATTEXT as part of the core commands?

Cheers,
Glenn.
I do know about them, but I don't use them.  I took a quick look before I started this, and I didn't like the way it worked.  Maybe I will look again, and see how the really work.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Glenn R

  • Guest
Re: My attribute extraction program
« Reply #8 on: December 14, 2007, 09:53:09 AM »
Tim,

In your code, in particular, your CommandMethod, unless your dialog is modeless, you don't have to lock the document - AutoCAD will implicitly lock it.

Other than that - looking good.

Cheers,
Glenn.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: My attribute extraction program
« Reply #9 on: December 14, 2007, 11:14:48 AM »
Thanks for the tip Glenn, and thanks for taking a look at it.  I really appreciate it.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.