Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been trying to add 3 things to my code
1. When the user clicks nothing, the code continues to run and doesn't increment
2. When the user clicks a something that isn't the correct block, it notifies the user to select the correct block
3. The only valid selection is either block "EQP_LBD-CMB" or "Trunk Cable", when the user selects either block it runs and increments.
I've tried a variety of things that I've found on the forums, but none seem to work. Here is my base code:
(defun C:EINC (/ *PCS* *block* *EQP* *EQP_Num*)
(vl-load-com)
(setq *PCS* (getstring "\nInput PCS Number: "))
(setq *EQP* (getint "\nInput Equipment Starting Number: "))
(while
(setq *block* (car (entsel "\nSelect Block: ")))
(setpropertyvalue *block* "PCS_NUM" *PCS*)
(setq *EQP_Num* (itoa *EQP*))
(setpropertyvalue *block* "EQP_NUM" *EQP_Num*)
(setq *EQP* (+ *EQP* 1))
)
(princ)
)
Solved! Go to Solution.