- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, The code below is part of a larger program which I am having trouble with one aspect since upgrading to 2021 from 2013. The issue is on the "SDX" COND part. Im being prompted to enter the scale where I wasnt before. Im able to set the rotation but Im losing the layer part which is working on the other CONDs and the program is not finishing after I insert the block. I guess this is a syntax issue or maybe I need something else for that COND. The difference between the SDX and others is I need to be able to set the rotation of the SDX but not the others.
(command "layer" "off" "*" "n" "m" "PLUMBING" "")
(setq pt_ins (osnap pt_temp2 "mid"))
(IF (null typ)
(PROGN (INITGET "SDX MDX Superflow AquaStar")
(SETQ TYP (COND ((GETKWORD "\nSpecify Main Drain [SDX/MDX/Superflow/AquaStar] <AquaStar>: "))
("AquaStar")
))))
(COND
((= TYP "Superflow")
(if pt_ins
(progn
(vl-cmdf "-INSERT" "PE_DRAIN-SUPERFLOW" pt_ins "1" "1" (angtos (angle pt_temp1 pt_temp2)) "2" "2" "0" "0"))))
((= TYP "SDX")
(if pt_ins
(progn
(vl-cmdf "-INSERT" "PE_DRAIN-SDX" pt_ins "S" 1 PAUSE PAUSE)))) ;;2021 fix scale prompt and dosent finish
((= TYP "MDX")
(if pt_ins
(progn
(vl-cmdf "-INSERT" "PE_DRAIN-MDX3" pt_ins "1" "1" (angtos (angle pt_temp1 pt_temp2)) "2" "2" "0" "0"))))
((= TYP "AquaStar")
(if pt_ins
(progn
(vl-cmdf "-INSERT" "PE_DRAIN-AquaStar" pt_ins "1" "1" (angtos (angle pt_temp1 pt_temp2)) "2" "2" "0" "0"))))
)
I had a similar issue with some dimensioning programs and worked it out by adding this:
(while (> (getvar 'CMDACTIVE) 0) (command pause))
but this did not help with this problem. Thanks for looking.
Solved! Go to Solution.