乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 41|回复: 4

acedGetEnv和acedSetEnv函数使用!!!

[复制链接]

28

主题

70

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
182
发表于 2008-5-30 23:45:00 | 显示全部楼层 |阅读模式
有人用过acedGetEnv和acedSetEnv函数吗?
我怎么使用都不行,是不是ARX中声明了没有实现哦???????
回复

使用道具 举报

0

主题

64

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
64
发表于 2008-6-3 09:47:00 | 显示全部楼层
extern "C" int acedGetEnv(const ACHAR * sym,ACHAR * var);
symInput environment variable name to get, which is case sensitive in all environments (Visual LISP, ObjectARX, and VB/ActiveX)varOutput preallocated buffer to be filled in with environment variable value (a buffer size of 1024 bytes should be sufficient)Retrieves the value of an environment variable. Looks first in the AutoCAD-specific FixedProfile/General section of the registry:
HKEY_CURRENT_USER
    Software
        Autodesk
            AutoCAD
                R15.0
                    [I]
                        FixedProfile
                            General
If an entry is not found in the registry, retrieves the value from the Windows system environment table.
Note This function will not work for AutoCAD sysvars. For AutoCAD sysvars, use .
If acedGetEnv() succeeds, it returns RTNORM; otherwise it returns RTERROR. This function is the complement of the  function.
Include Fileacedads.h
       
这段是帮助文档的话,说的很清楚了,这是得对应注册表的键值。如果要得系统变量用acedGetVar,不清楚你为什么要用这个函数,肯定是实现了的,不可能没实现。
回复

使用道具 举报

28

主题

70

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
182
发表于 2008-6-4 22:15:00 | 显示全部楼层
那你的意思就是如果我想获得CAD中的系统变量和改变CAD的系统变量只有通过注册表了是不是?
那ARX中还定义这两个函数干什么呢?
回复

使用道具 举报

63

主题

1203

帖子

10

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1455
发表于 2008-6-9 09:08:00 | 显示全部楼层
参考这个帖:)
我们这样用这些涵数的,
示例代码如下:
struct resbuf cmd, rb1,rb2 , *dxf;
  ads_name Ename;
  ads_point pt1 ;
  int m,n,k;
  //acedGetVar("osmode", & os);
  cmd.restype = RTREAL;
  cmd.resval.rreal = 0;
  acedSetVar("cmdecho", &cmd);//(SETVAR "CMDECHO" 0)
回复

使用道具 举报

28

主题

70

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
182
发表于 2008-6-12 22:08:00 | 显示全部楼层
可是这是acedGetVar,和acedGetEnv的声明不一样哦
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-6 06:51 , Processed in 0.473824 second(s), 73 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表