Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Anyone know why the first unwanted entry "R" is appearing in these options? Sure it's something very simple but I can't figure it out -
;;
;; Autocad addin PCCTools (Point Cloud Crop Tools)
;; must be installed for this to work
;;
;; Works relative to the current saved project orientation UCS "plan" with one viewport
;;
(defun c:SFC (/ VNUM VNUMS) ;; Section from crop, in 2nd VP
(defun *error* (MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG)))
(if osm (setvar "OSMODE" OSM))
(princ) )
(setq OSM (getvar "OSMODE"))
(command "OSNAP" "NONE")
(command "UCS" "V")
(initget "R P C B")
(setq CROPTYPE (cond ((getkword "\nChoose [<R>ectangle/<P>olygon/<C>ircle/<B>uffer]: ")) ("R")))
(if (or (= CROPTYPE "R") (= CROPTYPE "r")) (c:QPCRCROP))
(if (or (= CROPTYPE "P") (= CROPTYPE "p")) (c:QPCPCROP))
(if (or (= CROPTYPE "C") (= CROPTYPE "c")) (c:QPCCCROP))
(if (or (= CROPTYPE "B") (= CROPTYPE "b")) (c:PCBCROP))
(command "UCS" pause pause "") ;; pick UCS points of section
(command "PLAN" "C")
(setq VNUM (getvar "CVPORT"))
(if (> 3 VNUM) ;; check & set 2nd VP number
(setq VNUMS (1+ VNUM))
(setq VNUMS (1- VNUM))
)
(command "VPORTS" 2 "V")
(command "CVPORT" VNUM)
(command "UCS" "X" "90")
(command "PLAN" "C")
(command "UCS" "X" "-90")
(command "ZOOM" "O" "P" "")
(command "CVPORT" VNUMS)
(command "UCS" "NA" "R" "plan")
(command "ZOOM" "O" "P" "")
(setvar "OSMODE" OSM)
(princ)
)
Solved! Go to Solution.