Author Topic: Making last created highlighted for confirmation (updated)  (Read 791 times)

0 Members and 1 Guest are viewing this topic.

ScottMC

  • Newt
  • Posts: 191
Making last created highlighted for confirmation (updated)
« on: December 30, 2021, 03:37:10 PM »
I've delayed to not overload posting but.. really would appreciate
mod/add to get the new region more visible temporarily. My guess
is: errors connected to the boundary command which isn't done..
One attempted is flipping to flat shade, then back, but the color isn't
a contrast making it not visible itself. Can it work with temporary
object selection or color swap somehow?
      Suggestions really appreciated!

Corrected and much more usable!

Code - Auto/Visual Lisp: [Select]
  1. (defun c:r1 (/ hpb-1 sel)
  2.    (princ "\n Boundary of Intersecting ~ Island Regions..")
  3.    (setvar 'cmdecho 0)
  4.    (setq hpb-1 (getvar 'hpbound))     ; save boundary format..
  5.    (setvar 'hpbound 0)                         ; format boundary to create region
  6.    (setq sel (ssget '((0 . "REGION"))))  ; get region selection + setq
  7.    (vl-cmdf "copy" sel "" "0,0,0" "0,0,0")   ; make a copy of to use
  8.    (vl-cmdf "intersect" sel "")   ; make the intersecting region
  9.    (setvar 'hpbound hpb-1)                        ; restore boundary format..
  10.    (vl-cmdf "_.change" "_P" "" "_P" "C" 6 "")   ; change "L" color to 6/magenta temp..
  11.    (vl-cmdf "delay" 1)
  12.    (vl-cmdf "_.change" "_P" "" "_P" "C" "bylayer" "") ; revert to bylayer
  13.    (command "draworder" "_P" "" "F") ; move new region to top
  14.    (vl-cmdf "Move" "P" "")   ; option to move the new region
  15.    (setvar 'cmdecho 1)
  16.    (princ " Move or Cancel")
  17.    (princ)
  18. ) ;_ end of defun
  19.  
  20.  


EDIT (John): Added code tags.
« Last Edit: December 31, 2021, 10:04:18 AM by ScottMC »