-=MAPLE GALAXY=-
MapleStory Galaxy Private Server
FAQ
Search
Memberlist
Usergroups
Galleries
Register
Profile
Log in
-=MAPLE GALAXY=- Forum Index
->
1st Pelase Vote for Maple Galaxy!
Post a reply
Username
Subject
Message body
Emoticons
View more Emoticons
Font colour:
Default
Dark Red
Red
Orange
Brown
Yellow
Green
Olive
Cyan
Blue
Dark Blue
Indigo
Violet
White
Black
Font size:
Tiny
Small
Normal
Large
Huge
Close Tags
Options
HTML is
ON
BBCode
is
ON
Smilies are
ON
Disable HTML in this post
Disable BBCode in this post
Disable Smilies in this post
Confirmation code: *
All times are GMT + 2 Hours
Jump to:
Select a forum
General
----------------
News and Informations
1st Pelase Vote for Maple Galaxy!
Rules
Download
Registration
Forum Discussion
Maple Galaxy Discussion
----------------
General Discussion
Suggestions/Ideas
Support
Event Discussions
Bug Reports
MapleStory Discussion
----------------
Guides
Screenshots and Videos
General Discussion
Characters
Guild Recruitng
----------------
Guild Recruitng
Offtopick
----------------
Blablabla...
Spam
Forum for other languages
Topic review
Author
Message
ghdhair100
Posted: Thu 11:37, 03 Mar 2011
Post subject: CAD统计长度
;;;===================
;;;面积和长度统计程序
;;;highflybird kunming
;;;===================
(prompt "命令为:AM")
(defun C:am (/ f ss l i SSarea totlen entlen
ename name obj text-S text-L insPt0 height
insPt1 insPt2 text-1 text-2 *APP *DOC *MSP
)
(vl-load-com)
(setq *APP (vlax-get-acad-object))
(setq *DOC (vla-get-activeDocument *APP))
(setq *MSP (vla-get-Modelspace *DOC))
(initget 1 "1 2 3")
(setq f (getkword "\n请输入你要统计的<1>面积<2>长度<3>两者:"))
(if
(and
(setq ss (ssget))
(setq insPt0 (getpoint "\n请输入文字插入点: "))
(setq height (getdist "\n请输入文字高度:"))
)
(progn
(setq l (sslength ss))
(setq i 0)
(setq SSarea 0)
(setq totlen 0)
(setq insPt1 (vlax-3d-point insPt0))
(setq insPt2 (polar insPt0 (* 1.5 Pi) (* 1.5 height)))
(setq insPt2 (vlax-3d-point insPt2))
(cond
( (= f "1")
(repeat l
(func-1)
(func-2)
(setq i (1+ i))
)
(setq text-S (strcat (convert1 SSarea 6) "平方米"));总面积为:小数后6位
(vla-addtext *MSP text-S insPt1 height)
)
( (= f "2")
(repeat l
(func-1)
(func-3)
(setq i (1+ i))
)
(setq text-L (strcat (convert1 totlen 3) "米")) ;总长度为:小数后3位
(vla-addtext *MSP text-L insPt2 height)
)
( (= f "3")
(repeat l
(func-1)
(func-2)
(func-3)
(setq i (1+ i))
)
(setq text-S (strcat (convert1 SSarea 6) "平方米"));总面积为:小数后6位
(setq text-L (strcat (convert1 totlen 3) "米")) ;总长度为:小数后3位
(vla-addtext *MSP text-S insPt1 height)
(vla-addtext *MSP text-L insPt2 height)
)
)
)
(alert "你没有选取物体或者输入正确的数据!")
)
(princ)
)
(defun func-1 ()
(setq ename (ssname ss i))
(setq obj (vlax-ename->vla-object ename))
(setq elist (entget ename))
(setq name (cdr (assoc 0 elist)))
)Many years ago there lived an Emperor who was so exceedingly fond of fine new clothes that he spent vast sums of money on dress. To him clothes meant more than anything else in the world. He took no interes
related links:
新潮支招:“胖”女孩如何穿衣?
fora.pl
- załóż własne forum dyskusyjne za darmo
Powered by
phpBB
© 2001, 2005 phpBB Group
deoxBlue v1.0 // Theme created by
Sopel stylerbb.net & programosy.pl
Regulamin