- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to automate insertion of blocks for a Custom "Feild to Finshing" program. The idea here is to zoom to the insert point, and allow the user to rotate the block or connect to another object. Here, the user picks the power pole to draw the guy wire to. My main routine looks at survey point blocks descriptions runs several codes like:
(if (= DESC "GUY")
(progn
(load "GUY.lsp")
(command "zoom" "c" coords ZOOMLEV)
(command "GUY" coords PAUSE)
)
)
So that part feeds coordiates to "Guy.Lsp" then waits for the user input --picking the power pole to connect the guy wire to.
GUY.LSP is...
(defun C:GUY (/ GUYEND POWP SCALE )
(graphscr)
(setq SCALE (getvar "DIMSCALE"))
(command "layer" "set" "U-POLE" "")
(command "osnap" "node")
(prompt "\nOsnap is now set to NODE")
(setq GUYEND (getpoint "\nStarting point for guy wire, away from power pole: "))
(SETQ guyend (LIST (CAR guyend) (CADR guyend) 0.0))
(command "osnap" "NODE") ;;; <<<------- DOESN'T WORK
(setq POWP (getpoint GUYEND "\nSelect the center of the power pole: "))
(SETQ powp (LIST (CAR powp) (CADR powp) 0.0))
(command "osnap" "none")
(command "insert" "GUY" GUYEND SCALE "" POWP)
(command "line" GUYEND POWP "")
(command "osnap" "none")
(princ) ; end guy.lsp
)
Everything works except the OSNAP settings in "GUY.LSP" don't turn on/off.
Is there some setting I need to trip to make Osnaps work inside subroutines called by other routines?
Solved! Go to Solution.