最初由 ljhqfljhqf 发布
[B]如果当前图纸没有加载这种线型,如何加载AutoCAD预定义的线型? [/B]
你可以用 ads_command 调用 linetype 命令加载acad.lin 文件
如果不希望使用命令调用,你可以用纯ARX方法,这些在帮助文件里面都提供了,用 loadline.....就会出来的。需要记住的是,在ACAD下面,没有ARX做不了的,而所有方法都在帮助文件里面可以查到用法
- <normalfont>
- AcDbDatabase::loadLineTypeFile Function Acad::ErrorStatus
- loadLineTypeFile(
- const char * ltn,
- const char * filename);
- ltn Input linetype name string (wild cards may be used)
- filename Input path/filename or
- URL of linetype file to load from (path is optional)
- This function loads the linetype specified by ltname from
- the file specified by fname and
- stores it in the database on which this method is called.
- The ltname parameter may contain wild card characters (see the ads_wcmatch() documentation
- 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 is 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
- </normalfont>
|