马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 newer 于 2013-12-1 15:57 编辑
- ;|
- 获得填充文件中的填充模式名
- 参数:
- fn --- 填充文件名
- 返回值:
- 表 或 NIL
- 命令: (XD::Hatch:GetPatternName "acadiso.pat")
- ("SOLID" "ANGLE" "ANSI31" "ANSI32" "ANSI33" "ANSI34" "ANSI35" "ANSI36" "ANSI37"
- "ANSI38" "AR-B816" "AR-B816C" "AR-B88" "AR-BRELM" "AR-BRSTD" "AR-CONC"
- "AR-HBONE" "AR-PARQ1" "AR-RROOF" "AR-RSHKE" "AR-SAND" "BOX" "BRASS" "BRICK"
- "BRSTONE" "CLAY" "CORK" "CROSS" "DASH" "DOLMIT" "DOTS" "EARTH" "ESCHER" "FLEX"
- "GRASS" "GRATE" "GRAVEL" "HEX" "HONEY" "HOUND" "INSUL" "ACAD_ISO02W100")
- |;
- (defun XD::Hatch:GetPatternName(fn / lst str strl x)
- (setq fn (findfile fn))
- (if (setq lst (XD::List:FromFile fn))
- (progn
- (mapcar
- '(lambda (x)
- (if (and
- (= 0 (xdrx_string_find x "*"))
- (setq str (xdrx_string_split x ","))
- (setq str (car str))
- )
- (setq strl (cons (substr str 2) strl))
- )
- )
- lst
- )
- )
- )
- (reverse strl)
- )
|