明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1468|回复: 6

关于形位公差!

[复制链接]
发表于 2004-6-21 10:27:00 | 显示全部楼层 |阅读模式
请问形位公差在图形界面是对话框的形式,在lisp命令中如何使用?
发表于 2004-6-21 11:36:00 | 显示全部楼层
[I]vla-addtolerance[/I] definitely works
 楼主| 发表于 2004-6-21 14:22:00 | 显示全部楼层
alin,请问vla-系列函数使用时,是不是都必须先加载vl-load-com?


可不可以对vla-addtolerance,举个具体例子。


谢谢!
发表于 2004-6-21 15:17:00 | 显示全部楼层
本帖最后由 作者 于 2004-6-21 18:31:06 编辑

Just an example. (defun C:test() (vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq mspace (vla-get-modelspace doc)
utility (vla-get-utility doc))
(setq basePnt (vla-getPoint utility nil "\nBase Point: ")
textstring "%%vtol1%%vtol2%%v%%v%%v\n2\n3")
(setq direction (vlax-make-safearray vlax-vbDouble '(0 . 2)))
(vlax-safearray-fill direction '(1 0 0))
(setq toleranceObj (vla-addTolerance mspace textstring basePnt direction))
(vla-put-scalefactor toleranceObj (getvar "DIMSCALE"))
(princ)
)
发表于 2004-6-21 23:21:00 | 显示全部楼层
vla-addTolerance 这个函数在帮助中怎么查不到,怎么回事啊?
 楼主| 发表于 2004-6-22 18:44:00 | 显示全部楼层
对,我也同样发现这个问题了。
发表于 2004-6-22 19:21:00 | 显示全部楼层

是从ActiveX and VBA Reference帮助里转化而来的

RetVal = object.AddTolerance(Text, InsertionPoint, Direction)

Object

MSITStore:C:\Program%20Files\AutoCAD%202004\help\acadauto.chm::/idh_modelspace_collection.htm" target="_blank" >ModelSpace Collection, MSITStore:C:\Program%20Files\AutoCAD%202004\help\acadauto.chm::/idh_paperspace_collection.htm" target="_blank" >PaperSpace Collection, MSITStore:C:\Program%20Files\AutoCAD%202004\help\acadauto.chm::/idh_block_object.htm" target="_blank" >Block
The object or objects this method applies to.

Text

String; input-only
The text string for the tolerance.

InsertionPoint

Variant (three-element array of doubles); input-only
The 3D WCS coordinates in the drawing specifying the placement of the tolerance symbol.

Direction

Variant (three-element array of doubles); input-only
A 3D directional vector specifying the direction of the tolerance symbol.

RetVal

MSITStore:C:\Program%20Files\AutoCAD%202004\help\acadauto.chm::/idh_tolerance_object.htm" target="_blank" >Tolerance object
The newly created Tolerance object.

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

本版积分规则

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

GMT+8, 2024-11-28 12:31 , Processed in 0.185152 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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