明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2030|回复: 4

读取自定义图形特性

[复制链接]
发表于 2007-6-25 10:28:00 | 显示全部楼层 |阅读模式

我用

(vlax-invoke-method objPros 'SetCustomByIndex 0 pKey pValue)

可以设置一个自定义图形特性。

可当我用

(vlax-invoke-method objPros 'GetCustomByIndex 0 pKey pValue)

读自定义图形特性时,却读不到。读完以后的pKey、pValue的值还是我在读特性以前设置的值,我设置的值明显和对话框中的值不一样。不知道问题出在哪,请各位指教。

"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2007-6-25 10:37:00 | 显示全部楼层

(vlax-invoke-method objPros 'GetCustomByIndex 0 'pKey 'pValue)

(list pKey pValue)

 楼主| 发表于 2007-6-25 11:09:00 | 显示全部楼层

原来问题出在这儿

谢谢楼上的指教!!!

发表于 2013-1-17 21:23:46 | 显示全部楼层
  1.   (repeat (vla-NumCustomInfo DwgProps)

  2.      (vla-GetCustomByIndex DwgProps i 's1 's2)

  3.      (princ (strcat "\n" s1 " ->> " s2))

  4. ;;;vla-RemoveCustomByIndex DwgProps i)

  5.      (setq i (1+ i))

  6.    )
发表于 2013-1-17 21:24:19 | 显示全部楼层
  1.   (setq        DwgProps (vla-Get-SummaryInfo
  2.                    (vla-Get-ActiveDocument (vlax-Get-Acad-Object))
  3.                  )
  4.    )
  5.    (vla-Put-Author DwgProps "Author")

  6.    (vla-Put-Subject DwgProps "Subject")

  7.    (vla-Put-Title DwgProps "Title")

  8.    (vla-Put-RevisionNumber DwgProps "Revision")

  9.    (vla-AddCustomInfo DwgProps "Item" "Value")

  10.    (repeat (vla-NumCustomInfo DwgProps)

  11.      (vla-GetCustomByIndex DwgProps i 's1 's2)

  12.      (princ (strcat "\n" s1 " ->> " s2))

  13. ;;;vla-RemoveCustomByIndex DwgProps i)

  14.      (setq i (1+ i))

  15.    )
  16. ;;;end repeat

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-1 23:53 , Processed in 0.183201 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表