明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3920|回复: 3

如何lisp程序中获取光标所在处点的绝对坐标(不用grread、getpoint等函数)?如果有高

[复制链接]
发表于 2002-3-19 20:05 | 显示全部楼层 |阅读模式
如何lisp程序中获取光标所在处点的绝对坐标(不用grread、getpoint等函数)?如果有高手请告我知不胜感激[br]如何lisp程序中获取光标所在处点的绝对坐标(不用grread、getpoint等函数)?如果有高手请告我知,不胜感激
发表于 2002-3-19 20:43 | 显示全部楼层

winapi.arx中有此函数

The api_cursorpos function retrieves the cursor's position, in screen coordinates.

(api_cursorpos)



Parameters

none

Return Values

Success: a list of integers in the following form (x y)

Failure: nil

Remarks

The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.

  Windows 95/98: Requires Windows 95 or later.
 楼主| 发表于 2002-3-20 08:21 | 显示全部楼层

请问如何使用?我用的是autolisp ,请问如何调用winapi.arx?

发表于 2002-3-22 22:09 | 显示全部楼层

这样加载winapi.arx

把winapi.arx放在Acad的支持路径下,然后八以下代码加入您的程序开头
(IF (NOT (MEMBER "winapi.arx" (ARX)))
    (if (= "winapi.arx not found"
(ARXLOAD "objectdcl.arx" "winapi.arx not found."))
        (exit))
  )
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-24 01:42 , Processed in 0.169975 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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