TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DraxJDM on May 20, 2021, 05:16:17 AM

Title: import block from other drawing, on layer from drawing
Post by: DraxJDM on May 20, 2021, 05:16:17 AM
hey all,

i use the code from Lee mac http://www.lee-mac.com/copyblockfromdrawing.html (http://www.lee-mac.com/copyblockfromdrawing.html)

It works fine, except it imports the block on the current layer.
Can this be changend so the blocks comes in at the layer it is in the source drawing?
Title: Re: import block from other drawing, on layer from drawing
Post by: kpblc on May 20, 2021, 06:31:14 AM
Try to change CLAYER system variable, import block and then return CLAYER
Title: Re: import block from other drawing, on layer from drawing
Post by: Lee Mac on May 22, 2021, 09:52:26 AM
I use the code from Lee mac http://www.lee-mac.com/copyblockfromdrawing.html (http://www.lee-mac.com/copyblockfromdrawing.html)

It works fine, except it imports the block on the current layer.
Can this be changend so the blocks comes in at the layer it is in the source drawing?

The program is importing the block definition from the source drawing and then inserting a reference of such definition into the active drawing; what if there are multiple references in the source drawing, each residing on different layers?
Title: Re: import block from other drawing, on layer from drawing
Post by: DraxJDM on May 24, 2021, 12:50:43 PM
 there is only 1, reference in the 'source' drawing.

 
Title: Re: import block from other drawing, on layer from drawing
Post by: martinle on May 24, 2021, 02:53:22 PM
Very exciting topic! A solution from the experts here would be very useful and helpful for many users!