PDA

View Full Version : Unexpected response


tflaherty
2005-05-20, 09:42 PM
I discovered an unexpected response from the cabinet routine I inherited and am trying to clean up. At one point in the routine it prompts the user to select the lower left corner and upper right corner of the space to draw the cabinets in; works every time, unless the user zooms into the point he's trying to pick, then the only piece that gets drawn is the part that can be seen in the current window. Is that a normal AutoCAD reaction or is it possible to still get it to draw the whole length of cabinets.

madcadder
2005-05-20, 10:10 PM
Normal. (to me at least)

I had some routines when I worked for a window manufacturer that would do that with dimensions and hatching.

The only work-around I found was to either have the routine do a ZOOM EXTENTS at the beginning or ZOOM out some factor.

New thought:
Are the osnaps on?

tflaherty
2005-05-20, 10:24 PM
The osnaps are on when the points are picked, but then the routine turns them off before it draws the lines.

(initget 1 "Upper Lower")
(setq CT (getkword "\nSpecify cabinet type to draw: [Upper/Lower] "))
(if (= CT "Upper")
(progn
;
;Set Variables
;
(setq NUC (getint "\nNumber of cabinets:"))
(setq PT1 (getpoint "\nLower-left corner of cabinet:"))
(setq PT3 (getcorner "\nUpper-right corner of cabinet:" PT1))
(setq PT2 (list (car PT1) (cadr PT3)))
(setq PT4 (list (car PT3) (cadr PT1)))
(setq NS (+ NUC 1))
(setq W (distance PT1 PT4))
(setq DW (/ (- W (* NS 1.5)) NUC))
;
;Draw the Door lines
;
(if (< (getvar "osmode") 16384)
(setvar "osmode" (+ 16384 (getvar "osmode")))
) ;_ end of if
(setq A (/ pi 4))
(setq D (sqrt 4.5))
(setq CC1 (polar PT1 A D))
(setq CC3 (list (+ (car CC1) DW) (- (cadr PT3) 1.5)))
(setq CC2 (list (car CC1) (cadr CC3)))
(setq CC4 (list (car CC3) (cadr CC1)))
(command "line" CC1 CC2 CC3 CC4 "c")

etc, etc

madcadder
2005-05-20, 11:06 PM
Gonna have to go back to by "it's normal" answer.
(hope someone proves me wrong)

CAB2k
2005-05-21, 02:41 AM
I don't think it's normal. :)
Perhaps it's the "c" that is giving you a problem.
try this:
(command "._line" CC1 CC2 CC3 CC4 CC1 "")