找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 3750|回复: 0

未公开的XREF API 文档...

[复制链接]

已领礼包: 145个

财富等级: 日进斗金

发表于 2002-1-10 18:13:17 | 显示全部楼层 |阅读模式

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

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

×
XREF API DOCUMENTATION

See Also: SignPost Contents SignPost Index Xrefs

Product AUTOCAD  Author SZILVASY,ALBERT
Date 27-AUG-99  Document ID 42357
Expiration date    Attachments  
Keywords _XREF

Developer Consulting Group technical solution. Autodesk confidential, for ADN members only. Please read the disclaimer

Question


How can I create xrefs using ObjectARX?


Answer


The following function have been introduced with ObjectARX 2000:


acedXrefAttach()
acedXrefOverlay()
acedXrefUnload()
acedXrefDetach()
acedXrefReload()
acedXrefBind()
acedXrefXBind()
acedXrefCreateBlockname()


The ObjectARX Reference Manual does not document these function that has been
logged as documentation defect. Here's more information on them:

Common rules:
1. All Xref APIs operate on the current document only.
2. The APIs provide document locking internally, if the document cannot be
locked they return Acad::ErrorStatus eLockViolation.
3. No input validation or range checking is done other than checking for
NULL pointers or strings. Input validation is the caller's responsibility.
4. Xref log file processing is available if option is enabled.
5. Normal AutoCAD behavior with regards to output indicators, such as, progress
meters, and msgs, may be turned off when scripts enabled && cmdecho == 0, or
menu macros enabled && menuecho == 0, or menu encryption set.

-----
Acad::ErrorStatus
acedXrefAttach(const char* XrefPathname,
const char* XrefBlockname,
AcDbObjectId* pXrefBTRid = NULL,
AcDbObjectId*    pXrefRefid     = NULL,
const AcGePoint3d* pXrefInsertPt = NULL,
const AcGeScale3d*    pXrefScale = NULL,
const double* pXrefRotateAngle = NULL,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Attaches an xref file to the current document.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefPathname [in] Xref file pathname
const char* XrefBlockname [in] Xref block name symbol to use
AcDbObjectId* pXrefBTRid [out,optional] AcDbObjectId ptr for the
attached/overlaid Xref block object Id
AcDbObjectId* pXrefRefid [out,optional] AcDbObjectId ptr for the
attached/overlaid Xref block reference object Id
const AcGePoint3d* pXrefInsertPt [in,optional] AcGePoint3d ptr for Insertion Pt
const AcGeScale3d* pXrefScale [in,optional] AcGeVector3d ptr for Scale factor
const double* pXrefRotateAngle [in, optional] double ptr for Rotate
angle(radians)
const Adesk::Boolean bQuiet [in, optional] Flag to suppress output msgs

Default behavior is as follows:
Insertion Point(X,Y,Z) = 0.0, 0.0, 0.0
Scale Factor(X,Y,Z) = 1.0, 1.0, 1.0
Rotation Angle(radians) = 0.0

-------
Acad::ErrorStatus
acedXrefOverlay(const char* XrefPathname,
const char* XrefBlockname,
AcDbObjectId* pXrefBTRid = NULL,
AcDbObjectId*    pXrefRefid = NULL,
const AcGePoint3d* pXrefInsertPt = NULL,
const AcGeScale3d* pXrefScale = NULL,
const double* pXrefRotateAngle = NULL,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Creates an xref overlay to the current document.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefPathname [in] Xref file pathname
const char* XrefBlockname [in] Xref block name symbol to use
AcDbObjectId* pXrefBTRid [out,optional] AcDbObjectId ptr for the
attached/overlaid Xref block object Id
AcDbObjectId* pXrefRefid [out,optional] AcDbObjectId ptr for the
attached/overlaid Xref block reference object Id
const AcGePoint3d* pXrefInsertPt [in,optional] AcGePoint3d ptr for Insertion Pt
const AcGeScale3d* pXrefScale [in,optional] AcGeVector3d ptr for Scale factor
const double* pXrefRotateAngle [in, optional] double ptr for Rotate
angle(radians)
const Adesk::Boolean bQuiet [in, optional] Flag to suppress output msgs

Default behavior is as follows:
Insertion Point(X,Y,Z) = 0.0, 0.0, 0.0
Scale Factor(X,Y,Z) = 1.0, 1.0, 1.0
Rotation Angle(radians) = 0.0

-----
Acad::ErrorStatus
acedXrefUnload(const char* XrefBlockname,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Unloads the Xref block by its given block name. This assumes a valid Xref block
exists in the current document.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefBlockname [in] Xref block name symbol for unload
const Adesk::Boolean bQuiet [in,optional] Flag to suppress output msgs

----

Acad::ErrorStatus
acedXrefDetach(const char* XrefBlockname,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Detaches the Xref block by its given block name. This assumes a valid Xref block
exists in the current document.

Returns:
Returns Acad::eOk if operation is successful

Parameters:
const char* XrefBlockname [in] Xref block name symbol for detach
const Adesk::Boolean bQuiet [in,optional] Flag to suppress output msgs

-------

Acad::ErrorStatus
acedXrefReload(const char* XrefBlockname,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Reloads the Xref block by its given block name. This assumes a valid Xref block
exists in the current document.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefBlockname [in] Xref block name symbol for reload
const Adesk::Boolean bQuiet [in,optional] Flag to suppress output msgs

-------

Acad::ErrorStatus
acedXrefBind(const char* XrefBlockname,
const Adesk::Boolean bInsertBind = Adesk::kFalse,
const Adesk::Boolean bQuiet = Adesk::kTrue);

Changes the Bind type of the Xref block by its given block name. This assumes a
valid Xref block exists in the current document.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefBlockname [in] Xref block name symbol for bind change
const Adesk::Boolean bInsertBind [in, optional] Converts Xref symbols to
insert-like bind names.
const Adesk::Boolean bQuiet [in, optional] Flag to suppress output msgs

-----
Acad::ErrorStatus
acedXrefXBind(const AcDbObjectIdArray symbolIds,
const bool bQuiet = true);

Binds symbols from xrefs to the current drawing.

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const AcDbObjectIdArray [in] object ids of symbol table records to be bound
const Adesk::Boolean bQuiet [in, optional] Flag to suppress output msgs

-----
Acad::ErrorStatus
acedXrefCreateBlockname(const char* XrefPathname,
char*& XrefBlockname);

Accepts a Xref file pathname and returns an internally allocated block name
symbol string buffer which follows the AutoCAD policy rules for its creation.
Typically, is composed of the filename of the Xref file. A return error will
occur if the block name cannot be created. The block name string's buffer must
be released via the acutDelString().

Returns:
Returns Acad::eOk if operation is successful.

Parameters:
const char* XrefPathname [in] pointer to a Xref file pathname
char*& XrefBlockname [out] Returns a pointer to a copy of the block
name symbol string

-----


See Also: SignPost Contents SignPost Index Xrefs

Disclaimer

This information is derived from a response to a specific question sent to the Developer Consulting Group at Autodesk, and thus given its nature, is subject to change without notice. The information is provided to you on an "as is" basis, and you may use it only at your own risk. Autodesk is not responsible for its quality, nor shall it be liable for any damage or loss caused by your use of this information.

Top
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-22 00:15 , Processed in 0.167315 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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