嗨Bigal
我认为这应该行得通,但似乎没有得到4分(最后4行)
- (defun InnerShape (/ InnerShape co-ords I xy co-ordsxy Innerpt1 Innerpt2 Innerpt3 Innerpt4)
- (setq InnerShape (vlax-ename->vla-object (entlast))) ;my name choice "InnerShape"
- (setq co-ords (vlax-safearray->list (vlax-variant-value
- (vlax-get-property InnerShape "Coordinates" )))) ;my name choice "InnerShape"
- (setq I 0)
- (repeat (/(length co-ords) 2)
- (setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) ))
- (setq co-ordsxy (cons xy co-ordsxy))
- (setq I (+ I 2)))
- (princ co-ordsxy)
- (setq Innerpt1 (nth 0 co-ordsxy) :always start with 0 NOT 1
- Innerpt2 (nth 1 co-ordsxy)
- Innerpt3 (nth 2 co-ordsxy)
- Innerpt4 (nth 3 co-ordsxy))
- )
|