Author Topic: Tough Questions - Copy Xref Layer Lisp  (Read 5393 times)

0 Members and 1 Guest are viewing this topic.

johnshar123xx

  • Guest
Tough Questions - Copy Xref Layer Lisp
« on: November 30, 2009, 02:29:42 PM »
Tough Questions - Copy Xref Layer Lisp

AutoCAD 2007
I have a quite a few tough questions/requests and I am currently looking for some lisps to solve them.  I have been doing some searching online to find the lisps I need, and although I have been able to find some stuff, I still have some things that I can't seem to find exactly what I am looking for.  I would like to take the opportunity ahead of time to thank every who views my questions and for any help that is given.

Basically, lets say you have an xref overlayed or attached into your current drawing.  I was wondering if anyone has a lisp that would allow me to click on anything from that xref (from my current drawing) and have it copy everything that is on that xref layer to my current drawing, with the same layer name, linetype, etc. (looking exactly as it does in the xref).

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #1 on: November 30, 2009, 02:35:58 PM »
There's NCOPY but that only does the selected object.  I think someone here wrote something that.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #2 on: November 30, 2009, 03:08:52 PM »
There's NCOPY but that only does the selected object.  I think someone here wrote something that.
Was even a thread you started Matt.   :wink:

http://www.theswamp.org/index.php?topic=24251.0
Tim

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

Please think about donating if this post helped you.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #3 on: November 30, 2009, 03:39:40 PM »
There's NCOPY but that only does the selected object.  I think someone here wrote something that.
Was even a thread you started Matt.   :wink:

http://www.theswamp.org/index.php?topic=24251.0
HAHAHA!!  I think I've used that, like twice!  Maybe....  Just haven't had the need since then.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #4 on: December 01, 2009, 09:22:18 AM »
There's NCOPY but that only does the selected object.  I think someone here wrote something that.
Was even a thread you started Matt.   :wink:

http://www.theswamp.org/index.php?topic=24251.0
:lmao:
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #5 on: December 01, 2009, 04:06:40 PM »
NCOPY is how I am currently solving this problem, but it requires you to manually select every single piece from the layer (one at a time) and when it brings it in to my current drawing it doesn't use the same linetype as the xref it is copying from.

I thank you guys for taking the time to help me, I really appreciate it.

Serge J. Gianolla

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #6 on: December 01, 2009, 04:09:41 PM »
Perhaps you can "steal" layers via Design Center prior to use NCOPY?!

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #7 on: December 01, 2009, 04:18:52 PM »
No No No! You guys are doing it all wrong.

Repeat after me.
Bind, then Explode, then Purge, then Delete, then Purge, then Rinse, then Spin and then Hang.

Slick as cold butter on ice bread!
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

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #8 on: December 01, 2009, 04:20:20 PM »
No No No! You guys are doing it all wrong.

Repeat after me.
Bind, then Explode, then Purge, then Delete, then Purge, then Rinse, then Spin and then Hang.

Slick as cold butter on ice bread!
Unfortunately, this only works when Binding does (which is about 50% of the time), not to mention much more of a pain than using LISP.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #9 on: December 01, 2009, 04:38:48 PM »
No No No! You guys are doing it all wrong.

Repeat after me.
Bind, then Explode, then Purge, then Delete, then Purge, then Rinse, then Spin and then Hang.

Slick as cold butter on ice bread!
You forgot FLATTEN!   :whistle:

And I thought the saying was "slicker than dogs*** on wet leaves"?   :-)
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #10 on: December 02, 2009, 07:11:29 AM »
No No No! You guys are doing it all wrong.

Repeat after me.
Bind, then Explode, then Purge, then Delete, then Purge, then Rinse, then Spin and then Hang.

Slick as cold butter on ice bread!
You forgot FLATTEN!   :whistle:

And I thought the saying was "slicker than dogs*** on wet leaves"?   :-)
I did not want to dig up that poor horse.  And for that matter I am starting to get the festive mood.  :-)
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

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #11 on: December 02, 2009, 03:25:31 PM »
Wondering if anyone has the lisp I requested.  I work with a couple people that have used this lisp before at past jobs, but still no luck at finding it.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #12 on: December 02, 2009, 03:33:50 PM »
Wondering if anyone has the lisp I requested.  I work with a couple people that have used this lisp before at past jobs, but still no luck at finding it.
See the third post of this thread.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #13 on: December 02, 2009, 05:05:34 PM »
See Matt W you were looking for this at one time, we are a lot alike you and I, minus the flaming skull.  I went to the link you gave, and downloaded the copynesteditem.lsp file but when I try to use it I was not able to get it to work.  Are you suppose to do something with the "mydialogs.dcl" file?

You said you had errors undoing.  Did you ever fix that problem as well?

That is in reality exactly what I am looking for, to be able to ncopy an entire layer from an xref, in one step, with just one click it automatically does it.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #14 on: December 02, 2009, 05:18:44 PM »
You have to put the *.dcl file in the Acad search path.  If you don't know what that is, go to options->files->support file search path... when you click the ' + ' button, it will list the support paths.  Pick one, and put the *.dcl file there.  Or you could create a new folder, and add that to the support paths, and put all your custom routines there.
Tim

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

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #15 on: December 02, 2009, 05:35:16 PM »
Alternatively, I think (getenv "ACAD") shows all support paths.  :wink:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #16 on: December 02, 2009, 06:32:37 PM »
Alternatively, I think (getenv "ACAD") shows all support paths.  :wink:

Yea, but to a normal user who doesn't lisp, I don't think they would know what they are looking at.   :wink:  Don't get too crazy there programmer...
Tim

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

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #17 on: December 02, 2009, 06:36:44 PM »
Alternatively, I think (getenv "ACAD") shows all support paths.  :wink:

Yea, but to a normal user who doesn't lisp, I don't think they would know what they are looking at.   :wink:  Don't get too crazy there programmer...

True  :lol:

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #18 on: December 08, 2009, 09:38:35 AM »
Thank you guys for your help, I placed the .dcl file in my autocad 2007 support folder and I loaded the lisp, but when I try to select an object in my xref to copy to my current drawing, the lisp kicks back one of two different responses....

1.) Error-->: no function definition: SINGLESELECT
2.) Error-->: no function definition: GETCURRENTSPACE

I have attached the lisp and the .dcl file, if anyone has the time and knowledge to try this and get it to work, it will be greatly appreciated.  Hopefully this lisp is what I have been searching for.
Again I would just like to be able to NCOPY an entire xref layer to the current drawing by selecting an object in the xref, in one quick step.

Thank you again to everyone who has tried to help me out.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #19 on: December 08, 2009, 11:00:49 AM »
Thank you guys for your help, I placed the .dcl file in my autocad 2007 support folder and I loaded the lisp, but when I try to select an object in my xref to copy to my current drawing, the lisp kicks back one of two different responses....

1.) Error-->: no function definition: SINGLESELECT
2.) Error-->: no function definition: GETCURRENTSPACE

I have attached the lisp and the .dcl file, if anyone has the time and knowledge to try this and get it to work, it will be greatly appreciated.  Hopefully this lisp is what I have been searching for.
Again I would just like to be able to NCOPY an entire xref layer to the current drawing by selecting an object in the xref, in one quick step.

Thank you again to everyone who has tried to help me out.

Both of those are in the post where you got the file from.

Quote from: the other post
Here is one I wrote with the help of gile, and then the copy xref layer ( CopyNestedLayer ) was an idea I got from Joe Burke. Here are some subs that are needed for the file.  Let me know if I missed anything.

Just copy them into the lisp file.
Tim

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

Please think about donating if this post helped you.

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #20 on: December 08, 2009, 03:14:25 PM »
Thank you for all for your help and special thanks to you T.Willey for being patient and for all your help.

Okay, so I added the two pieces of code to the lisp as you said.
The parts of lisp that work, work absolutely perfect! The lisp copies the objects, on the right layer, with the right linetype, and it does it in one step which is amazing.  The only thing that I have not been able to get to work is getting it to take all the objects on that xref layer and copy it in to my current drawing, it only does one object at a time.  Would like to be able to for example choose a piece of text from an xref, and have the lisp return everything on that text layer from the xref, and bring it in to my current drawing.

Do you know if I am doing something wrong?
Other than that it is EXACTLY what I am looking for.  Thank You

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #21 on: December 08, 2009, 04:21:21 PM »
There is more than one command within the lisp file, if I remember correctly.  The one you want to use is ' CopyNestedLayer '.  You're welcome.
Tim

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

Please think about donating if this post helped you.

johnshar123xx

  • Guest
Re: Tough Questions - Copy Xref Layer Lisp
« Reply #22 on: December 09, 2009, 09:19:54 AM »
SUCCESS!!!!

"copynestedlayer" works great, this is 100% exactly what I was looking for.
This was a real tough one to find and I couldn't have done it without everyones help.
I thank you all for the time and help that you put into solving this problem.

Special thanks to Matt W for leading me to the forum and asking the question in the first place and most of all special thanks to T.Willey for not only writing the lisp but for helping me to get it to work.