明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 11681|回复: 39

求转出槽孔每个点坐标成文本文件的LISP!

  [复制链接]
发表于 2007-8-31 20:30:00 | 显示全部楼层 |阅读模式

就是比如一个异形孔,选孔或点一下闭合了的孔里面就能转出每条线的交点坐标文件的,转出坐标要按顺时针或逆时针的排序.久仰明经里面高手如云...希望高手能出来帮帮忙.在下感激不尽!!

 楼主| 发表于 2007-9-4 20:45:00 | 显示全部楼层

几天了,,高手呢?唉....

发表于 2007-9-5 02:08:00 | 显示全部楼层

最好能给个图,画上几个比较有代表性的孔,让我们好分析

毕竟隔行如隔山

 楼主| 发表于 2007-9-6 00:52:00 | 显示全部楼层

请问怎么样上传本地图片?

发表于 2007-9-6 15:30:00 | 显示全部楼层
首先得说明你的OBJECT,至于点坐标,不同的对象用的属性和方法也不同,
 楼主| 发表于 2007-9-7 01:06:00 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2007-9-7 01:09:00 | 显示全部楼层

能像这样转出坐标的,转出的坐标成文本文件的.高手们帮帮忙.谢谢.

发表于 2007-9-7 16:46:00 | 显示全部楼层

看了一下,都是LINE直线,应该可以!代码大致如下:

private sub xxxx111()

     dim ppset1111 as acadselectionsets

     if ppset1111.count>0 then

        ppset1111.delete

     end if

     set ppset1111=thisdrawing.selectionsets.add("lineselect")

dim ppline1(0 to 0) as integer,ppline2(0 to 0) as variant

ppline1(0)=0

ppline2(0)="line"

ppset1111.select acselectionsetall,,,ppline1,ppline2

dim ppline1 as acadentity

dim ppoint1 as variant,ppoint2 as variant

dim ii1() as variant,ii2() as variant,ii3() as variant

dim i as double

i=0

for each ppline1 in ppset1111

   ppoint1=ppline1.startpoint

   ppoint2=ppline1.endpoint

  redim ii1(i)

  ii1(i)(0)=ppoint(0)

  ii1(i)(1)=ppoint(1)

  ii1(i)(2)=0

dim pptext as acadtext

dim insertpoint(0 to 0) as double

insertpoint(0)=ii1(i)(0)

insertpoint(1)=ii1(i)(1)+10 '

insertpoint(2)=0

set pptext=thisdrawing.modelspace.addtext(insertpoint,ii1(i)(0),1)

....................

next ppline1

end sub

 楼主| 发表于 2007-9-8 00:37:00 | 显示全部楼层

 错误: 函数错误: "lineselect"

这样啊,天龙八部兄能不能再帮帮忙写好?非常感激.

 楼主| 发表于 2007-9-10 08:45:00 | 显示全部楼层
天龙八部兄再现身帮帮忙啊.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-27 20:40 , Processed in 0.233909 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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