Author Topic: reorder attributes in source dwg  (Read 5010 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
reorder attributes in source dwg
« on: July 19, 2007, 05:50:03 PM »
Quick question, I know you can use battman to reorder the attributes on/in an inserted block, but how do you fix the original.  The only way I know is to insert, explode, and re wblock it out over the original version.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #1 on: July 19, 2007, 06:01:23 PM »
The order of the atts when wblocking are the order of selection. If that helps.

But I'm sure you knew this.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #2 on: July 19, 2007, 06:13:51 PM »
yea, I knew that.  The problem is when it was wblocked, a few were picked out of order.  Its a huge panel with terminal blocks, so there are over 150 attributes in the block.  Just looking for a quick way to fix it.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: reorder attributes in source dwg
« Reply #3 on: July 19, 2007, 06:30:16 PM »
Wild Guess!
Perhaps you can use the "DRAWORDER" command to fix the problem.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #4 on: July 19, 2007, 07:07:55 PM »
Redefine? With an ObjectDBX interface would be something to consider.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: reorder attributes in source dwg
« Reply #5 on: July 19, 2007, 07:20:44 PM »
Quick question, I know you can use battman to reorder the attributes on/in an inserted block, but how do you fix the original.  The only way I know is to insert, explode, and re wblock it out over the original version.

Your close.
Insert you block into drawing.  Use Battman to reorganize to your hearts content.  then Wblock the unexploded block out and save over the original.

There is something I am forgetting so before saving over test it by saving as different name or to a different location and then reinsert the block to see if the order is revised. 

I think I will go test this.  It been a long time since I had to do this.

****************************************************
Okay I tested it. 
and it works as I described.


Buuuuuttttt
There is always a butt (NO Greg, I did not call your name.  IF I wanted you I would have said butt ...... Never mind)

This might be a bug or something.  I don't remember it doing this in ADT 05.  But then again my memory is going to places I never been

I open the newly saved over block file and all the attributes were viewing as if they were left center justified.  When gripped and checked with the properties pallet the justification read middle center justified as they are supposed to be.  I change them to left justified and back to middle justified and they rid correctly.  A quick use of the qselect command aught to help make your life easier in selecting the attributes if your results are the same as mine.
« Last Edit: July 19, 2007, 07:43:51 PM by Krushert »
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #6 on: July 19, 2007, 07:46:08 PM »
Are they columnar attributes that can be (programmatically) ordered by their y ordinates?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #7 on: July 19, 2007, 07:51:02 PM »
Are they columnar attributes that can be (programmatically) ordered by their y ordinates?

What an extraordinary idea!

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #8 on: July 19, 2007, 07:53:19 PM »
{ sniffs for sarcasm }

Did someone already mention this and I missed it?

Sorry?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #9 on: July 19, 2007, 08:05:45 PM »
{ sniffs for sarcasm }

Did someone already mention this and I missed it?

Sorry?

No, I was being genuine. Hadn't thought of Y order. I'm out of practice, been dealing with nuts and bolts too much.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #10 on: July 19, 2007, 08:50:17 PM »
I'm out of practice, been dealing with nuts and bolts too much.

Man I hate when that happens.

Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #11 on: July 19, 2007, 08:57:31 PM »
I'm out of practice, been dealing with nuts and bolts too much.

Man I hate when that happens.

Pays better.

 :-)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #12 on: July 19, 2007, 08:58:31 PM »
Pays better.

Compared to what exactly and who?

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

deegeecees

  • Guest
Re: reorder attributes in source dwg
« Reply #13 on: July 19, 2007, 09:02:05 PM »
Pays better.

Compared to what exactly and who?

:)

Speaking from personal experiences, of course.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #14 on: July 19, 2007, 09:04:12 PM »


{ end thread hijack }

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #15 on: July 20, 2007, 09:58:30 AM »
MP, they are somewhat columnar, but they overlap enough in the Y that I think it would be too much trouble to write that program.  My brain doesn't even want to think about it.  I think I will try the wblock version

thanks
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #16 on: July 20, 2007, 10:00:38 AM »
Pic?

Subtitle: I wouldn't mind thinking about it.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #17 on: July 20, 2007, 10:17:53 AM »
ok, i fixed it, but had to explode the block in itself bc I was getting an error about referenceing itself.

MP, here is the dwg file for you to play with.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #18 on: July 20, 2007, 10:40:32 AM »
Thanks Cmdr. 

Looks to me like you could order them based on a multi level sort, using the attribute prompts (prefix and integer part) as the sort keys.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #19 on: July 20, 2007, 11:34:38 AM »
How would you deal with the atts at the top and bottem of the list though?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reorder attributes in source dwg
« Reply #20 on: July 20, 2007, 11:41:34 AM »
You mean block number and type? Code would place them manually at the top, but the other 240 attribs could be ordered by the prompt, albeit by parsing into prefix and id (integer) and grouping.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CADaver

  • Guest
Re: reorder attributes in source dwg
« Reply #21 on: July 23, 2007, 03:58:26 PM »
Hammer and tongs approach:
Insert Block in current file
BATTMAN to reorder attributes (and "sync")
WBLOCK block to overwrite old definition.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #22 on: July 23, 2007, 05:18:43 PM »
Hammer and tongs approach:
Insert Block in current file
BATTMAN to reorder attributes (and "sync")
WBLOCK block to overwrite old definition.
I did that, and it said the block referenced itself.  I just opened the block, exploded it, saved, purged, closed.  Problem fixed
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Josh Nieman

  • Guest
Re: reorder attributes in source dwg
« Reply #23 on: July 23, 2007, 05:24:35 PM »
Hammer and tongs approach:
Insert Block in current file
BATTMAN to reorder attributes (and "sync")
WBLOCK block to overwrite old definition.
I did that, and it said the block referenced itself.  I just opened the block, exploded it, saved, purged, closed.  Problem fixed


If that is what fixes your problems, you may wanna add this little bit to the acaddoc.lsp

^C^C;_ai_selall;erase;^C^C-purge;A;;N;^C^Cqsave;

 :evil:

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: reorder attributes in source dwg
« Reply #24 on: July 23, 2007, 05:49:16 PM »
If that is what fixes your problems, you may wanna add this little bit to the acaddoc.lsp
^C^C;_ai_selall;erase;^C^C-purge;A;;N;^C^Cqsave;
 :evil:
Cool, let me add that right now
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

ronjonp

  • Needs a day job
  • Posts: 7531
Re: reorder attributes in source dwg
« Reply #25 on: July 23, 2007, 06:25:33 PM »
Hammer and tongs approach:
Insert Block in current file
BATTMAN to reorder attributes (and "sync")
WBLOCK block to overwrite old definition.
I did that, and it said the block referenced itself.  I just opened the block, exploded it, saved, purged, closed.  Problem fixed


The self referencing block is created when a block is defined in a drawing that has the same same name as the drawing then inserted into another drawing.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Josh Nieman

  • Guest
Re: reorder attributes in source dwg
« Reply #26 on: July 23, 2007, 06:40:20 PM »
If that is what fixes your problems, you may wanna add this little bit to the acaddoc.lsp
^C^C;_ai_selall;erase;^C^C-purge;A;;N;^C^Cqsave;
 :evil:
Cool, let me add that right now

I figured it's not a vicious macro since I probably screwed it up, and I didn't add a close command, so you can still undo and resave.

CADaver

  • Guest
Re: reorder attributes in source dwg
« Reply #27 on: July 23, 2007, 06:46:36 PM »
Hammer and tongs approach:
Insert Block in current file
BATTMAN to reorder attributes (and "sync")
WBLOCK block to overwrite old definition.
I did that, and it said the block referenced itself.  I just opened the block, exploded it, saved, purged, closed.  Problem fixed
The self referencing block is created when a block is defined in a drawing that has the same same name as the drawing then inserted into another drawing.

Exactly.  When WBLOCKing use the "Block" option and select the block from the pull-down list.  DO NOT "select objects" and select the block itself from the drawing.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: reorder attributes in source dwg
« Reply #28 on: July 23, 2007, 06:50:57 PM »
Another way.
Explode the block (No wblock), remake the block (chose overwrite) and pick the atts one at a time in the order you want then dispalyed.
(No express tools)