非常感谢大家。仍然没有解决我的问题,因为我无法通过autolisp向每个层添加描述?这是我尝试使用这个程序的唯一原因:
- (setq layers (list "005_DIMENSION" "off"
- "thaw" "unlock" "255"
- "255" "255" "Continuous"
- "-3" "TEST_01" "dimensions FOR ALL DRAWINGS"
- )
- )
- (entmake (list (cons 0 "LAYER")
- (cons 100 "AcDbSymbolTableRecord")
- (cons 100 "AcDbLayerTableRecord")
- (cons 2 (car layers))
- (cons 70 0)
- )
- )
- (setq layers (cdr layers))
- (if (= (car layers) "on")
- (setq test ':vlax-true) ;;;;;;here I am trying to add the value from a sym to a variable
- (setq test ':vlax-false) ;;;;;;here I am trying to add the value from a sym to a variable
- )
- (vla-put-layeron
- (vlax-ename->vla-object
- (tblobjname "LAYER" (car layers))
- )
- (eval (vl-symbol-value test))
- )
- (vla-put-layeron
- (vlax-ename->vla-object
- (tblobjname "LAYER" (car layers))
- )
- (eval test) ;;;;;;here I want to read the variable's value from the symbol
- )
我在开始时创建的列表只是一个占位符,因为我实际上是从包含所有图层和条件列表的CSV文件中读取这些值。正如我所说的,主要问题是我无法添加描述。
再次感谢大家 |