只需一步,快速开始
(command "_ucs" "ob")通过选择一个实体设置UCS,如何用Vlisp实现呢?不用command命令,可以透明使用。请高手指教
使用道具 举报
The collection of all user coordinate systems (UCSs) in the drawing.
VBA class name:
AcadUCSs
Create using:
N/A
Access via:
Document.UserCoordinateSystems
其实选择对象选择的是一个面,,,,,参考
Signatures: Overview
Blocks
RetVal = object.Add(InsertionPoint, Name)
UCSs
RetVal = object.Add(Origin, XAxisPoint, YAxisPoint, Name)
主要是不明白怎么把实体的一些数据转换成:Origin, XAxisPoint, YAxisPoint
原来好像有一个读取3DSOLID的坐标点的程序,这个处理过程个人感觉应该还是很难的,因为就算实体的坐标及面的信息转化出来,点取的点好像还要经过一系列的转换来判断具体选择到哪个面上,,,,,,,,,,
搜到这个贴子:但似乎不能正确使用,懂的给看一下为什么
set to the WCS coordinates of the point picked on the region, this setsthe current UCS to the plane of the selected region:{code}( (eq entype "REGION" )(setq normal (vlax-get obj 'Normal))(setq regUCS ;;create UCS parallel to the region(vla-add(vla-get-usercoordinateSystems actdoc)(vlax-3D-point (trans '(0 0 0) normal 0))(vlax-3D-point (trans '(1 0 0) normal 0))(vlax-3d-point (trans '(0 1 0) normal 0))"zztemp02"))(vla-put-origin regUCS (vlax-3d-point newOrig 0 1)) ;;moveUCS origin to point picked on region(vla-put-activeUCS actDoc regUCS) ;;update UCS...{code}
这方面没有了解,如读天书。。。
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-3-29 06:43 , Processed in 0.173074 second(s), 26 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.