0 Members and 1 Guest are viewing this topic.
@marko can you please post a video?
Quote from: Marc'Antonio Alessi on April 08, 2019, 03:26:46 PM@marko can you please post a video?You have to test it and see if that's what you're looking for...Code slightly changed...Regards, M.R.BTW. Now it doesn't matter how do you pick window... It is assumed that you work with WCS...
; (ALE_Edit_StretchAttribLayer "*");(defun ALE_Edit_StretchAttribLayer (LyrNms / Pnt001 Pnt002 Ss_Str EntNam Countr) (if (and (setq Pnt001 (getpoint "\nSpecify first corner of Crossing Window: ")) (not (initget 32)) (setq Pnt002 (getcorner Pnt001 "\nSpecify opposite corner: ")) ) (progn (if (setq Ss_Str (ssget "_C" Pnt001 Pnt002 (list (cons 8 LyrNms)))) (progn (princ "\nBase point: " ) (vl-cmdf "_.STRETCH" Ss_Str "" "\\") (setq Pnt001 (getvar "LASTPOINT")) (princ "\nSecond point: " ) (vl-cmdf "\\" ) (setq Pnt002 (getvar "LASTPOINT")) (repeat (setq Countr (sslength Ss_Str)) (and (= (cdr (assoc 0 (entget (setq EntNam (ssname Ss_Str (setq Countr (1- Countr))))))) "INSERT") (mapcar (function (lambda (a) (vla-move a (vlax-3d-point (trans Pnt001 1 0)) (vlax-3d-point (trans Pnt002 1 0))) ) ) (vlax-invoke (vlax-ename->vla-object EntNam) 'getattributes) ) ) ) ) (princ "\nNo Objects to Stretch found in Crossing Window.") ) ) ) (princ))
What if not all attribute references are inside the CW?
Quote from: roy_043 on April 09, 2019, 09:27:47 AMWhat if not all attribute references are inside the CW?You should have tested my code...