Author Topic: Xref overlay without detach  (Read 5793 times)

0 Members and 1 Guest are viewing this topic.

cadpro

  • Guest
Xref overlay without detach
« on: November 04, 2008, 03:49:21 AM »
Hi,

Can xref be overlayed without detaching it?

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Xref overlay without detach
« Reply #1 on: November 04, 2008, 04:10:52 AM »

If you detach it, the xref cant be overlayed or attached .. cause it is detached and not linked(referenced) into the drawing.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Xref overlay without detach
« Reply #2 on: November 04, 2008, 04:23:44 AM »
.. and i see that you've posted the same question on autodesk.autocad.customization.dotnet.
will be interesting to see if you get a different answer.


ps;
I haven't checked, but it seems that almost every question you've asked for the last couple of years has been about xrefs ... you should be an expert at them shortly :D
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Xref overlay without detach
« Reply #3 on: November 04, 2008, 06:03:14 AM »
 :lmao:
Me

cadpro

  • Guest
Re: Xref overlay without detach
« Reply #4 on: November 04, 2008, 07:47:12 AM »
ps;
I haven't checked, but it seems that almost every question you've asked for the last couple of years has been about xrefs ... you should be an expert at them shortly

I wish I could be!   :wink:
« Last Edit: November 04, 2008, 07:53:35 AM by cadpro »

cadpro

  • Guest
Re: Xref overlay without detach
« Reply #5 on: November 04, 2008, 07:50:34 AM »

If you detach it, the xref cant be overlayed or attached .. cause it is detached and not linked(referenced) into the drawing.


All sample codes that I saw throughout the threads do a detach of the same xref before changing it to overlay. But, this doesn't work if the block is xrefed in multiple layouts.

Is there a way to access the xrefmanager to change the xref to overlay?

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Xref overlay without detach
« Reply #6 on: November 04, 2008, 11:05:55 AM »
I'd like to know too, it seems like it would be such an easy thing to put in the API.
I would use that in about three different tools I can think of.
James Maeding

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Xref overlay without detach
« Reply #7 on: November 04, 2008, 11:10:42 AM »
wait, this is a duplicate thread, let's keep to the other one with all the code.
James Maeding

T.Willey

  • Needs a day job
  • Posts: 5236
Re: Xref overlay without detach
« Reply #8 on: November 04, 2008, 11:16:32 AM »
You can try the lisp code here [ http://www.theswamp.org/index.php?topic=25232.0 ].  If it works for you, then you should be able to change it to .Net for your purpose, but it does detach and reattach the xref as the type you want.
Tim

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

Please think about donating if this post helped you.

Bryco

  • Water Moccasin
  • Posts: 1851
Re: Xref overlay without detach
« Reply #9 on: November 04, 2008, 12:54:03 PM »
At a guess, when you change an xref (w/ multiple inserts) from insert to overlay they all change at the same time. So remove all xrefs with that name and reinsert them.  Oh I guess you already tried that and it didn't work, silly me.

cadpro

  • Guest
Re: Xref overlay without detach
« Reply #10 on: November 05, 2008, 12:08:30 AM »
So remove all xrefs with that name and reinsert them.

That is the issue!  :ugly:

cadpro

  • Guest
Re: Xref overlay without detach
« Reply #11 on: November 05, 2008, 12:20:05 AM »
You can try the lisp code here [ http://www.theswamp.org/index.php?topic=25232.0 ].  If it works for you, then you should be able to change it to .Net for your purpose, but it does detach and reattach the xref as the type you want.

That didn't work.

T.Willey

  • Needs a day job
  • Posts: 5236
Re: Xref overlay without detach
« Reply #12 on: November 05, 2008, 06:47:48 PM »
You can try the lisp code here [ http://www.theswamp.org/index.php?topic=25232.0 ].  If it works for you, then you should be able to change it to .Net for your purpose, but it does detach and reattach the xref as the type you want.

That didn't work.
Are you working with nested xrefs?  If so, then it wasn't tested for that since I don't use them.  If not, then maybe you can post the drawing file and xrefs, so that I can test.
Tim

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

Please think about donating if this post helped you.

cadpro

  • Guest
Re: Xref overlay without detach
« Reply #13 on: November 11, 2008, 03:19:07 AM »
No nested xrefs. Only title blocks.

jjs

  • Guest
Re: Xref overlay without detach
« Reply #14 on: November 14, 2008, 01:55:51 PM »
Why can't you record all the insertion information, then detach and reattach?
You could save a layerstate before and reapply it afterward.
Insertion points and scale factors should not be hard.

KewlToyZ

  • Guest
Re: Xref overlay without detach
« Reply #15 on: November 14, 2008, 03:41:52 PM »
I got this routine from here, couldnt remember the post it was from.
x2a turns them all to attachments x2o changes them all to overlays

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Xref overlay without detach
« Reply #16 on: November 19, 2008, 04:26:12 PM »
detaching is very undesirable, as I have tried that approach of recording the original data, and resetting afterwards.
Its ok on simple stuff, but anything complicated like nested items, or multiple viewports makes it really involved to do.  It would be far, far, better to be able to change the attach flag via the API.
James Maeding

Bob Wahr

  • Guest
Re: Xref overlay without detach
« Reply #17 on: November 19, 2008, 04:51:05 PM »
I agree that it would be swell to be able to change an xref from an attachment to an overlay, but AutoCAD doesn't give that ability at this point in time.

jjs

  • Guest
Re: Xref overlay without detach
« Reply #18 on: November 19, 2008, 05:31:15 PM »
what about with dotted pairs in lisp? You used to be able to look at the dotted pairs and change those directly. Someone on vbdesign even came up with a vba routine that changed the dotted pairs.

jjs

  • Guest
Re: Xref overlay without detach
« Reply #19 on: November 19, 2008, 05:34:53 PM »
http://www.autodesk.com/techpubs/autocad/dxf/dxf2002.pdf
70 - 8 seems to be overlay.
Code: [Select]
Block group codes (continued)

100 Subclass marker (AcDbEntity)
8 Layer name
100 Subclass marker (AcDbBlockBegin)
2 Block name
70 Block-type flags (bit coded values, may be combined):
0 = Indicates none of the following flags apply
1 = This is an anonymous block generated by hatching, associative
dimensioning, other internal operations, or an application
2 = This block has non-constant attribute definitions (this bit is not set if
the block has any attribute definitions that are constant, or has no
attribute definitions at all)
4 = This block is an external reference (xref)
8 = This block is an xref overlay
16 = This block is externally dependent
32 = This is a resolved external reference, or dependent of an external
reference (ignored on input)
64 = This definition


jjs

  • Guest
Re: Xref overlay without detach
« Reply #20 on: November 19, 2008, 05:47:14 PM »
TWO DXF FILES, ONLY DIFFERENCE WAS XREF TYPE.

OVERLAY
Code: [Select]
AcDbEntity
  8
0
100
AcDbBlockBegin
  2
0800200GTB
 70
    44

 10
0.0
 20
0.0
 30
0.0
  3
0800200GTB
  1
..\arch\0800200GTB.dwg
  0
ENDBLK

ATTACH
Code: [Select]
AcDbEntity
  8
0
100
AcDbBlockBegin
  2
0800200GTB
 70

    36
 10
0.0
 20
0.0
 30
0.0
  3
0800200GTB
  1
..\arch\0800200GTB.dwg
  0
ENDBLK

jjs

  • Guest
Re: Xref overlay without detach
« Reply #21 on: November 19, 2008, 05:49:41 PM »
if you change the 36 to 44 or vice versa and open the dxf, the attachement type changes accordingly.

Bob Wahr

  • Guest
Re: Xref overlay without detach
« Reply #22 on: November 19, 2008, 06:17:56 PM »
Wasn't it SCMDave who was doing that.