有哪个朋友能回答我的这个问题?
我想请教AUTOCAD2000上的一个问题?就是平时用手工做的工程图图纸是的比如变压器,它的尺寸是按1:5来画的,而它的明细表是按1:1的比例来画的,象这样的图纸在AUTICAD2000上能实现吗?
当然可以实现,同一图纸上不同比例的问题的解决方法很多的...
当然可以实现,同一图纸上不同比例的问题的解决方法很多的...能教我一下吗?
请你教我一下行吗?因为我是一个初学者,万分感谢!~~~~~~~~~~~
你用1:5来画图你不累呀??记住任何图一定要1:1画哦,这是对初学者一个最有用的忠告……
听我的没错儿:) 本帖最后由 作者 于 2002-3-21 18:25:49 编辑
在原来1:5的图形中提取你所需的零件,copy到一旁,用scale将其放大5倍,就得到1∶1的图形。
1:1
应1:1绘图
在绘制时,完全使用1:1绘制,然后缩小或放大copy到图框中,删去不必要的部分形成零件图。十分简单
在模型空间按1:1画图,然后出图时在图纸空间做两个Viewport一个显示比例为1:1,另一个为1:5(打印明细表)这种方法不建议适用!!
这种方法不建议适用!!我的方法
将各种幅面的图框做成文件,保存在AUTOCAD的搜索路径下,1:1绘好图后,将所需图框文件插到本图中来,再将绘好的图形按需要的比例缩放至图框中,然后再标注尺寸和填写明细表标题栏。下列程式可加入图框:
使用说明:
1、 按提示拉一个框包围住要放入图框的图形,系统会自动判定从A1到A4幅面的图框最适合的比例并在弹出对话框中列出.
2、在弹出对话框中选择图框并在对应图框下的下拉列表中选取比例,同时填写标题栏上图号、名称等数据,确定后,系统会自动按所选比例缩放图形,放入相应图框,同时将该图框的角点和比例载入数据库中。
提示:
a、在第一步拉框时,如果所拉的框X方向尺寸大于Y方向尺寸,则放入A型(横放)图框,相反则放入B型(竖放)图框。
b、用此命令在自动缩放图形时,图形中已标注的尺寸和线型比例会自动按所选比例重新设置,而尺寸值不会改变。
注意,本程式中的图框大小和名称是按我所使用的定义的,如果你的图框和我的不一致,可适当修改程式即可运行,如果需要,可将你的图框定义数据发给我,我帮你修改源程序。
;lisp源程序
(defun tkd (/ w h)
(defun *error* (msg)
(command "layer" "s" lay "")
(command "undo" "E")
(setvar "cmdecho" oe)
(setvar "OSMODE" os)
(setq lb nil
gg nil
tttnil
eeenil
dd nil
tkknil
pa nil
pb nil
ps nil
test nil
ss nil
pttnil
k nil
ee nil
mc nil
th nil
cl nil
jz nil
mz nil
sl nil
tknnil
bl nil
bllnil
bblnil
tkxnil
tkynil
sxsnil
fdsnil
)
(princ)
)
(setq dcl1 (load_dialog "/lcad/dcl/tk.dcl"))
(if (not (new_dialog "TK" dcl1))
(exit)
)
(start_image "tk1")
(setq w (dimx_tile "tk1"))
(setq h (dimy_tile "tk1"))
(slide_image 1 1 w h "/lcad/slide/tk1")
(end_image)
(set_tile "bl1" bl1)
(set_tile "th" th)
(set_tile "mc" mc)
(set_tile "cl" cl)
(set_tile "sl" sl)
(set_tile "jz" jz)
(set_tile "gz" gz)
(set_tile "dz" dz)
(start_image "tk2")
(setq w (dimx_tile "tk2"))
(setq h (dimy_tile "tk2"))
(slide_image 1 1 w h "/lcad/slide/tk2")
(end_image)
(set_tile "bl2" bl2)
(start_image "tk3")
(setq w (dimx_tile "tk3"))
(setq h (dimy_tile "tk3"))
(slide_image 1 1 w h "/lcad/slide/tk3")
(end_image)
(set_tile "bl3" bl3)
(start_image "tk4")
(setq w (dimx_tile "tk4"))
(setq h (dimy_tile "tk4"))
(slide_image 1 1 w h "/lcad/slide/tk4")
(end_image)
(set_tile "bl4" bl4)
(action_tile "th" "(setq th $value)")
(action_tile "mc" "(setq mc $value)")
(action_tile "cl" "(setq cl $value)")
(action_tile "sl" "(setq sl $value)")
(action_tile "jz" "(setq jz $value)")
(action_tile "gz" "(setq gz $value)")
(action_tile "dz" "(setq dz $value)")
(action_tile "tk1" "(setq tkk 1)")
(action_tile "tk2" "(setq tkk 2)")
(action_tile "tk3" "(setq tkk 3)")
(action_tile "tk4" "(setq tkk 4)")
(action_tile "bl1" "(setq bl1 $value)")
(action_tile "bl2" "(setq bl2 $value)")
(action_tile "bl3" "(setq bl3 $value)")
(action_tile "bl4" "(setq bl4 $value)")
(action_tile "accept" "(done_dialog)")
(action_tile "cancel" "(done_dialog) (exit)")
(start_dialog)
(unload_dialog dcl1)
(start_dialog)
)
(defun c:tk ()
(defun *error* (msg)
(command "layer" "s" lay "")
(command "undo" "E")
(setvar "cmdecho" oe)
(setvar "OSMODE" os)
(setq lb nil
gg nil
tttnil
eeenil
dd nil
tkknil
pa nil
pb nil
ps nil
test nil
ss nil
pttnil
k nil
ee nil
mc nil
th nil
cl nil
jz nil
mz nil
sl nil
tknnil
bl nil
bllnil
bblnil
tkxnil
tkynil
sxsnil
fdsnil
)
(princ)
)
(command "undo" "BE")
(setq oe (getvar "cmdecho"))
(setq os (getvar "OSMODE"))
(setvar "cmdecho" 0)
(setvar "OSMODE" 0)
(setvar "angdir" 0)
(setvar "angbase" 0)
(setq th "")
(setq mc "")
(setq cl "")
(setq sl "")
(setq jz "")
(setq gz "1")
(setq dz "1")
(setq sxs (list 0.01 0.1 0.2 0.250.4 0.5 1 2 2.5
4 5 6 8 10 20 25 50 100
200 250 500 10002000 2500500010000 20000
25000 50000 100000
)
)
(setq tkx (list 1154 806 570 393 275))
(setq tky (list 821 570 393 275 180))
(princ "\n请选取图形范围:")
(setq pa (getpoint))
(setq pb (getcorner pa))
(setq ss (ssget "C" pa pb))
(setq lx (abs (- (nth 0 pa) (nth 0 pb))))
(setq ly (abs (- (nth 1 pa) (nth 1 pb))))
(if (>= lx ly)
(progn
(setq i 0)
(while (< i (length tkx))
(setq j 0)
(while (< j (length sxs))
(if (>= (* (nth i tkx) (nth j sxs)) lx)
(progn
(setq sc (list (list i (nth j sxs) j)))
(if (= i 0)
(setq sca sc)
(setq sca (append sca sc))
)
(setq j (length sxs))
)
)
(setq j (+ j 1))
)
(setq i (+ i 1))
)
(setq pc (list (/ (+ (nth 0 pa) (nth 0 pb)) 2)
(/ (+ (nth 1 pa) (nth 1 pb)) 2)
)
)
(setq i 0)
(while (< i (length sca))
(setq rx
(/ (* (nth (nth 0 (nth i sca)) tkx) (nth 1 (nth i sca))) 2)
)
(setq ry
(/ (* (nth (nth 0 (nth i sca)) tky) (nth 1 (nth i sca))) 2)
)
(setq ps (list (- (nth 0 pc) rx) (- (nth 1 pc) ry)))
(setq tkn (strcat "AA" (itoa (nth 0 (nth i sca)))))
(command "insert" tkn ps (nth 1 (nth i sca)) "" "0")
(command "zoom" "c" pc (* rx 1.5))
(setq sln (strcat "/lcad/slide/tk" (itoa (nth 0 (nth i sca)))))
(command "mslide" sln)
(entdel (entlast))
(setq i (+ i 1))
)
(setq bl1 (itoa (nth 2 (nth 1 sca))))
(setq bl2 (itoa (nth 2 (nth 2 sca))))
(setq bl3 (itoa (nth 2 (nth 3 sca))))
(setq bl4 (itoa (nth 2 (nth 4 sca))))
(tkd)
(while (= tkk nil)
(alert "请选择一种图框!")
(tkd)
)
(setq tkn (strcat "AA" (itoa tkk)))
(cond
((<= tkk 1)
(setq bl bl1)
)
((<= tkk 2)
(setq bl bl2)
)
((<= tkk 3)
(setq bl bl3)
)
((<= tkk 4)
(setq bl bl4)
)
)
(setq bll (nth (atoi bl) sxs))
(command "insert" tkn pa bll "" "0")
(ssadd (entlast) ss)
(setq ee (entget (entlast)))
(setq test 1)
(command "zoom" "c" pa (* (nth tkk tkx) bll 2))
(while test
(setq ptt (grread T))
(setq k (car ptt))
(setq pa (cadr ptt))
(if (or (= k 5) (= k 3))
(progn
(setq ee (subst (cons 10 pa) (assoc '10 ee) ee))
(entmod ee)
)
)
(if (= k 3)
(setq test nil)
)
)
(setq dd (ssadd))
(setq bbl (/ 1.0 bll))
(setq ii 0)
(while (< ii (sslength ss))
(setq eee (ssname ss ii))
(setq ttt (cdr (assoc '0 (entget eee))))
(if (= ttt "DIMENSION")
(ssadd eee dd)
)
(setq ii (+ ii 1))
)
(command "dimoverride" "dimscale" "1" "dimlfac" bll "" dd "")
(command "scale" ss "" pa bbl)
(setq i (atoi (substr tkn 3 1)))
(setq pbb (polar pa 0 (nth (atoi (substr tkn 3 1)) tkx)))
(setq pcc (polar pa (dtr 90) (nth (atoi (substr tkn 3 1)) tky)))
(setq pb
(list (+ (nth 0 pa) (nth i tkx)) (+ (nth 1 pa) (nth i tky)))
)
(setq pc (list (+ (nth 0 pa) 30) (+ (nth 1 pa) (nth i tky) -6)))
(command "zoom" pa pb)
(setq pb (polar pa 0 (nth i tkx)))
(command "layer" "s" "7" "")
(ccd pc th 58 5 "MC")
(if (/= th "")
(command "rotate" (entlast) "" pc "180")
)
(setq pa (list (- (nth 0 pb) 90.0) (+ (nth 1 pb) 32.5)))
(ccd pa mc 58 7 "MC")
(setq pa (list (- (nth 0 pb) 30) (+ (nth 1 pb) 32.5)))
(ccd pa th 58 5 "MC")
(setq pa (list (- (nth 0 pb) 90.0) (+ (nth 1 pb) 7.5)))
(ccd pa cl 58 5 "MC")
(setq pa (list (- (nth 0 pb) 45) (+ (nth 1 pb) 17.5)))
(ccd pa jz 28 3.5 "MC")
(setq pa (list (- (nth 0 pb) 22.5) (+ (nth 1 pb) 17.5)))
(ccd pa sl 13 3.5 "MC")
(setq pa (list (- (nth 0 pb) 105) (+ (nth 1 pb) 17.5)))
(ccd pa gz 9 3.5 "MC")
(setq pa (list (- (nth 0 pb) 75) (+ (nth 1 pb) 17.5)))
(ccd pa dz 9 3.5 "MC")
(setq pa (list (- (nth 0 pb) 7.5) (+ (nth 1 pb) 17.5)))
(if (>= (atoi bl) 6)
(if (= (atoi bl) 8)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat "1:" (rtos bll 2 1))))))
(ccd pa (strcat "1:" (rtos bll 2 1)) 13 3.5 "MC")
)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat "1:" (rtos bll 2 0))))))
(ccd pa (strcat "1:" (rtos bll 2 0)) 13 3.5 "MC")
)
)
(if (= (atoi bl) 4)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat (rtos bbl 2 1) ":1")))))
(ccd pa (strcat (rtos bbl 2 1) ":1") 13 3.5 "MC")
)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat (rtos bbl 2 1) ":1")))))
(ccd pa (strcat (rtos bbl 2 1) ":1") 13 3.5 "MC")
)
)
)
)
(progn
(setq i 0)
(while (< i (length tky))
(setq j 0)
(while (< j (length sxs))
(if (>= (* (nth i tky) (nth j sxs)) lx)
(progn
(setq sc (list (list i (nth j sxs) j)))
(if (= i 0)
(setq sca sc)
(setq sca (append sca sc))
)
(setq j (length sxs))
)
)
(setq j (+ j 1))
)
(setq i (+ i 1))
)
(setq pc (list (/ (+ (nth 0 pa) (nth 0 pb)) 2)
(/ (+ (nth 1 pa) (nth 1 pb)) 2)
)
)
(setq i 0)
(while (< i (length sca))
(setq rx
(/ (* (nth (nth 0 (nth i sca)) tky) (nth 1 (nth i sca))) 2)
)
(setq ry
(/ (* (nth (nth 0 (nth i sca)) tkx) (nth 1 (nth i sca))) 2)
)
(setq ps (list (- (nth 0 pc) rx) (- (nth 1 pc) ry)))
(setq tkn (strcat "AB" (itoa (nth 0 (nth i sca)))))
(command "insert" tkn ps (nth 1 (nth i sca)) "" "0")
(command "zoom" "c" pc (* ry 2.5))
(setq sln (strcat "/lcad/slide/tk" (itoa (nth 0 (nth i sca)))))
(command "mslide" sln)
(entdel (entlast))
(setq i (+ i 1))
)
(setq bl1 (itoa (nth 2 (nth 1 sca))))
(setq bl2 (itoa (nth 2 (nth 2 sca))))
(setq bl3 (itoa (nth 2 (nth 3 sca))))
(setq bl4 (itoa (nth 2 (nth 4 sca))))
(tkd)
(while (= tkk nil)
(alert "请选择一种图框!")
(tkd)
)
(setq tkn (strcat "AB" (itoa tkk)))
(cond
((<= tkk 1)
(setq bl bl1)
)
((<= tkk 2)
(setq bl bl2)
)
((<= tkk 3)
(setq bl bl3)
)
((<= tkk 4)
(setq bl bl4)
)
)
(setq bll (nth (atoi bl) sxs))
(command "insert" tkn pa bll "" "0")
(ssadd (entlast) ss)
(setq ee (entget (entlast)))
(setq test 1)
(command "zoom" "c" pa (* (nth tkk tkx) bll 5))
(while test
(setq ptt (grread T))
(setq k (car ptt))
(setq pa (cadr ptt))
(if (or (= k 5) (= k 3))
(progn
(setq ee (subst (cons 10 pa) (assoc '10 ee) ee))
(entmod ee)
)
)
(if (= k 3)
(setq test nil)
)
)
(setq pbb (polar pa 0 (nth (atoi (substr tkn 3 1)) tky)))
(setq pcc (polar pa (dtr 90) (nth (atoi (substr tkn 3 1)) tkx)))
(setq dd (ssadd))
(setq bbl (/ 1.0 bll))
(setq ii 0)
(while (< ii (sslength ss))
(setq eee (ssname ss ii))
(setq ttt (cdr (assoc '0 (entget eee))))
(if (= ttt "DIMENSION")
(ssadd eee dd)
)
(setq ii (+ ii 1))
)
(command "dimoverride" "dimscale" "1" "dimlfac" bll "" dd "")
(command "scale" ss "" pa bbl)
(setq i (atoi (substr tkn 3 1)))
(setq pb
(list (+ (nth 0 pa) (nth i tky)) (+ (nth 1 pa) (nth i tkx)))
)
(setq pc (list (+ (nth 0 pa) 30) (+ (nth 1 pa) (nth i tkx) -6)))
(command "zoom" pa pb)
(setq pb (polar pa 0 (nth i tky)))
(command "layer" "s" "7" "")
(ccd pc th 58 5 "MC")
(if (/= th "")
(command "rotate" (entlast) "" pc "180")
)
(setq pa (list (- (nth 0 pb) 90.0) (+ (nth 1 pb) 32.5)))
(ccd pa mc 58 7 "MC")
(setq pa (list (- (nth 0 pb) 30) (+ (nth 1 pb) 32.5)))
(ccd pa th 58 5 "MC")
(setq pa (list (- (nth 0 pb) 90.0) (+ (nth 1 pb) 7.5)))
(ccd pa cl 58 5 "MC")
(setq pa (list (- (nth 0 pb) 45) (+ (nth 1 pb) 17.5)))
(ccd pa jz 28 3.5 "MC")
(setq pa (list (- (nth 0 pb) 22.5) (+ (nth 1 pb) 17.5)))
(ccd pa sl 13 3.5 "MC")
(setq pa (list (- (nth 0 pb) 105) (+ (nth 1 pb) 17.5)))
(ccd pa gz 9 3.5 "MC")
(setq pa (list (- (nth 0 pb) 75) (+ (nth 1 pb) 17.5)))
(ccd pa dz 9 3.5 "MC")
(setq pa (list (- (nth 0 pb) 7.5) (+ (nth 1 pb) 17.5)))
(if (>= (atoi bl) 6)
(if (= (atoi bl) 8)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat "1:" (rtos bll 2 1))))))
(ccd pa (strcat "1:" (rtos bll 2 1)) 13 3.5 "MC")
)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat "1:" (rtos bll 2 0))))))
(ccd pa (strcat "1:" (rtos bll 2 0)) 13 3.5 "MC")
)
)
(if (= (atoi bl) 4)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat (rtos bbl 2 1) ":1")))))
(ccd pa (strcat (rtos bbl 2 1) ":1") 13 3.5 "MC")
)
(progn
(setq txdata (append txdata (list (list pbb pcc (strcat (rtos bbl 2 1) ":1")))))
(ccd pa (strcat (rtos bbl 2 1) ":1") 13 3.5 "MC")
)
)
)
)
)
(setq lb nil
gg nil
tttnil
eeenil
dd nil
tkknil
pa nil
pb nil
ps nil
test nil
ss nil
pttnil
k nil
ee nil
mc nil
th nil
cl nil
jz nil
mz nil
sl nil
tknnil
bl nil
bllnil
bblnil
tkxnil
tkynil
sxsnil
fdsnil
)
(command "layer" "s" lay "")
(command "undo" "E")
(setvar "cmdecho" oe)
(setvar "OSMODE" os)
(princ)
)
;dcl文件源代码
TK:dialog{
label = "加入图框";
:row{
:boxed_column{
label = "1号图";
: image_button{
key = "tk1";
width = 25;
aspect_ratio = 0.7;
color = 250;
}
:row{
:text{
label = "比例:";
}
:popup_list {
alignment=top;
key = "bl1";
list="100:1\n10:1\n5:1\n4:1\n2.5:1\n2:1\n1:1\n1:2\n1:2.5\n1:4\n1:5\n1:6\n1:8\n1:10\n1:20\n1:25\n1:50\n1:100\n1:200\n1:250\n1:500\n1:1000\n1:2000\n1:2500\n1:5000\n1:10000\n1:20000\n1:25000\n1:50000\n1:100000";
}
}
}
:boxed_column{
label = "2号图";
: image_button{
key = "tk2";
width = 25;
aspect_ratio = 0.7;
color = 250;
}
:row{
:text{
label = "比例:";
}
:popup_list {
alignment=top;
key = "bl2";
list="100:1\n10:1\n5:1\n4:1\n2.5:1\n2:1\n1:1\n1:2\n1:2.5\n1:4\n1:5\n1:6\n1:8\n1:10\n1:20\n1:25\n1:50\n1:100\n1:200\n1:250\n1:500\n1:1000\n1:2000\n1:2500\n1:5000\n1:10000\n1:20000\n1:25000\n1:50000\n1:100000";
}
}
}
}
:row{
:boxed_column{
label = "3号图";
: image_button{
key = "tk3";
width = 25;
aspect_ratio = 0.7;
color = 250;
}
:row{
:text{
label = "比例:";
}
:popup_list {
alignment=top;
key = "bl3";
list="100:1\n10:1\n5:1\n4:1\n2.5:1\n2:1\n1:1\n1:2\n1:2.5\n1:4\n1:5\n1:6\n1:8\n1:10\n1:20\n1:25\n1:50\n1:100\n1:200\n1:250\n1:500\n1:1000\n1:2000\n1:2500\n1:5000\n1:10000\n1:20000\n1:25000\n1:50000\n1:100000";
}
}
}
:boxed_column{
label = "4号图";
: image_button{
key = "tk4";
width = 25;
aspect_ratio = 0.7;
color = 250;
}
:row{
:text{
label = "比例:";
}
:popup_list {
alignment=top;
key = "bl4";
list="100:1\n10:1\n5:1\n4:1\n2.5:1\n2:1\n1:1\n1:2\n1:2.5\n1:4\n1:5\n1:6\n1:8\n1:10\n1:20\n1:25\n1:50\n1:100\n1:200\n1:250\n1:500\n1:1000\n1:2000\n1:2500\n1:5000\n1:10000\n1:20000\n1:25000\n1:50000\n1:100000";
}
}
}
}
:row{
:edit_box {
label = "图号:";
key = "th";
}
:edit_box {
label = "名称:";
key = "mc";
}
}
:row{
:edit_box {
label = "材质:";
key = "cl";
}
:edit_box {
label = "数量:";
key = "sl";
}
}
:row{
:edit_box {
label = "共几张?";
key = "gz";
}
:edit_box {
label = "第几张?";
key = "dz";
}
}
:edit_box {
label = "重量(Kg):";
key = "jz";
}
:spacer{}
ok_cancel;
}
页:
[1]