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

0 Members and 1 Guest are viewing this topic.

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)