disable selection cycling while measuring

This commit is contained in:
2019-11-28 01:45:52 +01:00
parent 8afb231388
commit 6dd18d6d9e
2 changed files with 9 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
; Just drag the script to the autocad window.
; The script automatically starts after loading, no command needed.
; Version 1.4
; Version 1.5
; Created by Peter Gyetvai
; gyetpet@mailbox.org
; git repo: https://git.gyetpet.dynu.net/infeeeee/revitDwgImportCleaner
@@ -177,8 +177,9 @@
; --------------------------------- unitCheck -------------------------------- ;
;CHeck units with measurement, change if wrong
(defun unitcheck (/ setunits currunit domeasure testdist dochange newunit newunitnum)
(defun unitcheck (/ setunits selectioncycling currunit domeasure testdist dochange newunit newunitnum)
(setq setunits (getvar "insunits"))
(setq selectioncycling (getvar "selectioncycling"))
(cond
((= setunits 0) (setq currunit "no units"))
@@ -212,7 +213,9 @@
(if
(= domeasure "Change")
(progn
(setvar "selectioncycling" 0)
(setq testdist (getdist "\nMeasure now"))
(setvar "selectioncycling" selectioncycling)
(initget 1 "Yes No")
(setq dochange (getkword (strcat "Measurement: " (rtos testdist) " " currunit "\nChange unit? [Yes/No]")))