本帖最后由 菜卷鱼 于 2024-5-11 16:26 编辑
- (defun nthcdr (n lst)
- (repeat n
- (setq lst (cdr lst))
- )
- lst
- )
- (defun arrayinfo (obj / info lst)
- (setq info (entget (cdr (assoc 330 (entget (asscc 330 (entget obj)))))))
- (while (/= (car (car info)) 1)
- (setq info (cdr info))
- )
- (repeat 9
- (setq lst (cons (cons (cdr (nth 0 info)) (cdr (nth 3 info))) lst))
- (setq info (nthcdr 7 info))
- )
- lst
- )
用arrayrect阵列对象之后,除了查看属性表,没有直接的api获得阵列信息
用法(arrayinfo obj)
返回(("Rows" . 3) ("RowSpacing" . 954.27) ("RowElevation" . 0.0) ("Levels" . 1) ("LevelSpacing" . 1.0) ("Items" . 4) ("ItemSpacing" . 1652.84) ("AxesAngle" . 1.5708) ("AlignItems" . 0))
注意:没有验证严谨性,不一定是正确的
|