这里只是快速运行代码。AutoLisp和VisualLisp的混合
- (setq acadapp (vlax-get-acad-object));Get the Acad App
- (setq adoc (vlax-get-property acadapp 'ActiveDocument));Get the ActiveDocument
- (setq mats (vlax-get-property adoc 'Materials));Get the Materials Collection
- (setq mymat (vlax-invoke-method mats 'Add "Test1"));Add a New Material
- (setq d (dictsearch (namedobjdict) "ACAD_MATERIAL"));Get the Material Dictionary
- (setq mymatent (cdr (cadr (member (cons 3 "Test1") d))));Get your new Material Entity Name
- (setq entd (entget mymatent));Get the Enity Data of your new Material
使用丹中尉的腿为你提供的链接来修改你的材料。
我希望这有帮助!
当做
Hippe013 |