citykunan 发表于 2005-1-14 13:20:00

在实体上加上字典

能不能在实体上,如一根线,一个圆上,加上自己的字典?如:(1 . "This is mine")

meflying 发表于 2005-1-14 13:35:00

(vlax-ldata-put (car (entsel)) "mykey" '(1 . "This is mine"))


这样取得:


        (vlax-ldata-get (car (entsel)) "mykey")


<BR>

citykunan 发表于 2005-1-14 13:43:00

谢谢飞斑竹。通过这个办法生成的dxf码为:((-1 . &lt;Entity name: 402e3d70&gt;) (0 . "LINE") (5 . "2E") (102 . <BR>"{ACAD_XDICTIONARY") (360 . &lt;Entity name: 402e3d80&gt;) (102 . "}") (330 . &lt;Entity <BR>name: 402e3cf8&gt;) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . <BR>"AcDbLine") (10 4.86681 2.40226 0.0) (11 17.187 6.53008 0.0) (210 0.0 0.0 1.0)) 有没有办法直接让dxf码得到的值为:((-1 . &lt;Entity name: 402e3d70&gt;) (0 . "LINE") (5 . "2E") (1 . "This is mine") (330 . &lt;Entity <BR>name: 402e3cf8&gt;) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . <BR>"AcDbLine") (10 4.86681 2.40226 0.0) (11 17.187 6.53008 0.0) (210 0.0 0.0 1.0))

alin 发表于 2005-1-14 14:04:00

I don't think you can push a line to accept group code 1.

meflying 发表于 2005-1-14 14:13:00

你那不是字典(应该是“词典”吧),那是乱来,DXF组码不是你想怎么样就能怎么样的。。。帮助文件中有DXF组码的介绍,不能违反这个原则的

citykunan 发表于 2005-1-14 14:17:00

知道了谢谢。
页: [1]
查看完整版本: 在实体上加上字典