;ML.LSP ;Dennis Shinn ;17411 N.E. 13th Pl. ;Bellevue, Wa. 98008 ;(206) 641-6946 ;Editing utility that moves all objects on a single layer ;maintaining their original elevation, but allowing osnap ;selection of the point on any other object, regardless ;of that objects coordinate elevation. ;Example of usage: given a multi story building with all floor ;plans drawn in the same drawing file and at their respective ;elevations, ML.LSP allows moving all wall lines on one floor ;by picking an entity on that floor's wall line layer, picking ;the osnap override on that layer, then picking any ;other object with any other osnap override as the point ;as a means of precisely controlling the placement of all the ;original objects yet maintaing their proper elevation. ;*********** N O T E ********* ;One word of caution: The elevation of the first ;picked point is used in the construction of the 3D point ;list for the final point. Picking a point using ;an object on other than the target layer will move all the ;objects to the elevation of the point!!! This could ;be useful in certain situations but is obviously disastrous ;if that's not the desired result! ;This program is released in the public domain. Anyone is free ;to use it, modify it to fit their needs, and to pass it on to ;others who might benifit. The only stipulation is that if you ;you do pass this code to others that it be in its original ;form. ;Possible enhancement(s): :Provide looping routine to collect more than one layer of ; objects to be moved. (DeFun C:ML () (GraphScr) (Prompt "\nPick object on layer to be moved: ") (SetQ ss (Cdr (Assoc 8 (EntGet (Car (EntSel) ) ) ) ) ss (SsGet "x" (List (Cons 8 ss))) p1 (GetPoint "\nFrom point: ") p2 (GetPoint p1 "\nTo point: ") ) (Command ".MOVE" ss "" p1 (List (Car p2) (Cadr p2) (Caddr p1) ) ) (Princ);end of ML.Lsp )