找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 805|回复: 3

[ARX函数]:请问ARX如何增加一个acad.lin中的某一个线型到当前图形

[复制链接]
发表于 2003-11-3 15:09:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
请问ARX如何增加一个acad.lin中的某一个线型到当前图形
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2003-11-23 17:54:13 | 显示全部楼层
我也需要问这个问题,欢迎大家回复!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2003-11-24 11:13:03 | 显示全部楼层
好像ARX中有个专门的函数实现此功能的,在全局函数中:
Acad::ErrorStatus

acdbLoadLineTypeFile(
    const char* ltname,
    const char* fname,

    AcDbDatabase* pDb);

ltname        Input linetype name string (wild cards may be used)
fname        Input path/filename or URL of linetype file to load from (path is optional)
pDb        Input pointer to the database to load the linetype(s) into

This function loads the linetype specified by ltname from the file specified by fname and stores it in the database specified by pDb. If pDb is NULL, then the database currently loaded in the AutoCAD editor is used.
The ltname parameter may contain wild card characters (see acutWcMatch() for more information on wild card usage). If wild cards are used, multiple linetypes may be loaded.
If fname is not a URL and does not contain a path, then the AutoCAD library search path will be searched for the file.

Returns Acad::eOk if successful.
Returns Acad::eNullObjectPointer if ltname or fname is NULL.
Returns Acad::eFileSystemErr If the specified file cannot be opened.
Returns Acad::eUndefinedLineType if the linetype name specified by ltname is not found in the file.
Returns Acad::eBadLineTypeName if the file contains a malformed record, or a syntax error is encountered.
Returns an appropriate Internet-specific Acad::ErrorStatus value if a URL is specified and the transfer is not successful.
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2003-11-24 19:21:57 | 显示全部楼层
看看这个函数吧!希望对你有用阿!
void arxLoadltype(char *ltname)
{

    Acad::ErrorStatus t=acdbCurDwg()->loadLineTypeFile(ltname,"acadiso.lin");
        switch(t)
        {
                case Acad::eOk:
                        acutPrintf("\nLoading linetype OK");
                        break;
                case Acad::eNullObjectPointer:
                        acutPrintf("\nLinetype or Linetype file nanme is NULL.");
                        break;
                case Acad::eFileSystemErr:
                        acutPrintf("\nthe specified file cannot be opened.");
                case Acad::eUndefinedLineType:
                        acutPrintf("\nlinetype name specified by ltname is not found in the file.");
                        break;
                case Acad::eBadLinetypeName:
                        acutPrintf("\nthe file contains a malformed record, or a syntax error is encountered.");
                        break;
                default:
                        acutPrintf("\nLoading Linetype error");
        }
}
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-21 08:12 , Processed in 0.216577 second(s), 36 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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