axboiler.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. //
  13. // AXBOILER.H
  14. //
  15. // Interface declarations for the AutoCAD Automation API +
  16. // common object/entity manipulation functions.
  17. //
  18. #ifndef __AXBOILER_H_
  19. #define __AXBOILER_H_
  20. #include "adesk.h" // Adesk::IntDbId
  21. #ifndef AXAUTOEXP
  22. #ifdef AXAUTO_DLL
  23. #define AXAUTOEXP __declspec(dllexport)
  24. #else
  25. #define AXAUTOEXP __declspec(dllimport)
  26. #endif
  27. #endif
  28. #include "axobjref.h"
  29. #ifdef _ADESK_WINDOWS_
  30. DEFINE_GUID(IID_IAcadBaseObject,
  31. 0x5f3c54c0, 0x49e1, 0x11cf, 0x93, 0xd5, 0x8, 0x0, 0x9, 0x9e, 0xb3, 0xb7);
  32. /* Definition of interface: IAcadBaseObject */
  33. #undef INTERFACE
  34. #define INTERFACE IAcadBaseObject
  35. interface DECLSPEC_UUID("5F3C54C0-49E1-11cf-93D5-0800099EB3B7")
  36. IAcadBaseObject : public IUnknown
  37. {
  38. /* IUnknown methods */
  39. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  40. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  41. STDMETHOD_(ULONG, Release)(THIS) PURE;
  42. /* IAcadBaseObject methods */
  43. STDMETHOD(SetObjectId)(THIS_ AcDbObjectId& objId,
  44. AcDbObjectId ownerId = AcDbObjectId::kNull,
  45. ACHAR* keyName = NULL) PURE;
  46. STDMETHOD(GetObjectId)(THIS_ AcDbObjectId* objId) PURE;
  47. STDMETHOD(Clone)(THIS_ AcDbObjectId ownerId, LPUNKNOWN* pUnkClone) PURE;
  48. STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE;
  49. STDMETHOD(NullObjectId)(THIS) PURE;
  50. STDMETHOD(OnModified)(THIS) PURE;
  51. };
  52. typedef IAcadBaseObject* LPACADBASEOBJECT;
  53. // {ADAAAEC4-C7FE-11d5-8D60-0010830243CE}
  54. DEFINE_GUID(IID_IAcadBaseObject2,
  55. 0xadaaaec4, 0xc7fe, 0x11d5, 0x8d, 0x60, 0x0, 0x10, 0x83, 0x2, 0x43, 0xce);
  56. /* Definition of interface: IAcadBaseObject2 */
  57. interface DECLSPEC_UUID("ADAAAEC4-C7FE-11d5-8D60-0010830243CE")
  58. IAcadBaseObject2 : public IUnknown
  59. {
  60. /* IUnknown methods */
  61. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  62. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  63. STDMETHOD_(ULONG, Release)(THIS) PURE;
  64. /* IAcadBaseObject2 methods */
  65. STDMETHOD(ForceDbResident)(THIS_ VARIANT_BOOL* forceDbResident) PURE;
  66. STDMETHOD(AddToDb)(THIS_ AcDbObjectId& objId,
  67. AcDbObjectId ownerId = AcDbObjectId::kNull,
  68. ACHAR* keyName = NULL) PURE;
  69. STDMETHOD(CreateObject)(THIS_ AcDbObjectId ownerId = AcDbObjectId::kNull,
  70. ACHAR* keyName = NULL) PURE;
  71. STDMETHOD(ObjectExists)(THIS_ VARIANT_BOOL* objectExists) PURE;
  72. STDMETHOD(SetObject)(THIS_ AcDbObject*& pObj) PURE;
  73. STDMETHOD(GetObject)(THIS_ AcDbObject*& pObj) PURE;
  74. STDMETHOD(OnModified)(THIS_ DISPID = DISPID_UNKNOWN) PURE;
  75. };
  76. typedef IAcadBaseObject2* LPACADBASEOBJECT2;
  77. DEFINE_GUID(IID_IRetrieveApplication,
  78. 0x765b4640, 0x664a, 0x11cf, 0x93, 0xf3, 0x8, 0x0, 0x9, 0x9e, 0xb3, 0xb7);
  79. /* Definition of interface: IRetrieveApplication */
  80. interface DECLSPEC_UUID("765B4640-664A-11cf-93F3-0800099EB3B7")
  81. IRetrieveApplication : public IUnknown
  82. {
  83. /* IUnknown methods */
  84. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  85. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  86. STDMETHOD_(ULONG, Release)(THIS) PURE;
  87. /* IRetrieveApplication methods */
  88. STDMETHOD(SetApplicationObject)(THIS_ LPDISPATCH pAppDisp) PURE;
  89. STDMETHOD(GetApplicationObject)(THIS_ LPDISPATCH* pAppDisp) PURE;
  90. };
  91. typedef IRetrieveApplication* LPRETRIEVEAPPLICATION;
  92. DEFINE_GUID(IID_IAcadBaseDatabase,
  93. 0xcb1488c4, 0x2bec, 0x11d2, 0xb6, 0x7b, 0x0, 0x60, 0xb0, 0x87, 0xe2, 0x35);
  94. /* Definition of interface: IAcadBaseDatabase */
  95. interface DECLSPEC_UUID("CB1488C4-2BEC-11d2-B67B-0060B087E235")
  96. IAcadBaseDatabase : public IUnknown
  97. {
  98. /* IUnknown methods */
  99. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  100. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  101. STDMETHOD_(ULONG, Release)(THIS) PURE;
  102. /* IAcadBaseObject methods */
  103. STDMETHOD(SetDatabase)(THIS_ AcDbDatabase*& pDb) PURE;
  104. STDMETHOD(GetDatabase)(THIS_ AcDbDatabase** pDb) PURE;
  105. STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE;
  106. };
  107. typedef IAcadBaseDatabase* LPACADBASEDATABASE;
  108. DEFINE_GUID(IID_IIMetaColorSuppressor,
  109. 0xbd1c37b2, 0x9020, 0x43ad, 0x99, 0xd4, 0x25, 0x91, 0x6a, 0x4b, 0xfb, 0xc);
  110. /* Definition of interface: IMetaColorSuppressor */
  111. interface DECLSPEC_UUID("BD1C37B2-9020-43ad-99D4-25916A4BFB0C")
  112. IMetaColorSuppressor : public IUnknown
  113. {
  114. /* IAcadAcCmColorAccess methods */
  115. STDMETHOD(GetSuppressor)(THIS_ bool* val) PURE;
  116. STDMETHOD(SetSuppressor)(THIS_ bool val) PURE;
  117. };
  118. typedef IMetaColorSuppressor* LPMETACOLORSUPPRESSOR;
  119. DEFINE_GUID(IID_IAcadAcCmColorAccess,
  120. 0xf74f68db, 0x8f24, 0x4e74, 0xb1, 0x4d, 0x9b, 0xf4, 0xfe, 0x27, 0x7b, 0xd3);
  121. /* Definition of interface: IAcadAcCmColorRetrieve */
  122. #undef INTERFACE
  123. #define INTERFACE IAcadAcCmColorAccess
  124. interface DECLSPEC_UUID("F74F68DB-8F24-4e74-B14D-9BF4FE277BD3")
  125. IAcadAcCmColorAccess : public IUnknown
  126. {
  127. /* IAcadAcCmColorAccess methods */
  128. STDMETHOD(GetAcCmColor)(THIS_ AcCmColor* clr) PURE;
  129. STDMETHOD(SetAcCmColor)(THIS_ AcCmColor* clr) PURE;
  130. };
  131. typedef IAcadAcCmColorAccess* LPACADACCMCOLORACCESS;
  132. /* Definition of interface: IAcadBaseSubEntity */
  133. DEFINE_GUID(IID_IAcadBaseSubEntity,
  134. 0xb374d885, 0xeece, 0x4138, 0x8c, 0x82, 0x3f, 0xb2, 0xc, 0x53, 0x87, 0x88);
  135. #undef INTERFACE
  136. #define INTERFACE IAcadBaseSubEntity
  137. interface DECLSPEC_UUID("B374D885-EECE-4138-8C82-3FB20C538788")
  138. IAcadBaseSubEntity : public IUnknown
  139. {
  140. /* IUnknown methods */
  141. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  142. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  143. STDMETHOD_(ULONG, Release)(THIS) PURE;
  144. /* IAcadBaseSubEntity methods */
  145. STDMETHOD(OnModified)() PURE;
  146. STDMETHOD(SetFullSubEntPath)(THIS_ AcDbFullSubentPath& subentPath) PURE;
  147. STDMETHOD(GetFullSubEntPath)(THIS_ AcDbFullSubentPath* subentPath) PURE;
  148. STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE;
  149. };
  150. typedef IAcadBaseSubEntity* LPACADSUBENTITY;
  151. //
  152. // Common object/entity helper functions
  153. //
  154. HRESULT AXAUTOEXP
  155. AcAxErase(AcDbObjectId& objId);
  156. HRESULT AXAUTOEXP
  157. AcAxSetXData(AcDbObjectId& objId, VARIANT type, VARIANT data);
  158. HRESULT AXAUTOEXP
  159. AcAxGetXData(AcDbObjectId& objId, BSTR bstrName, VARIANT* type, VARIANT* data);
  160. HRESULT AXAUTOEXP
  161. AcAxGetObjectName(AcDbObjectId& objId, BSTR* pName);
  162. HRESULT AXAUTOEXP
  163. AcAxGetHandle(AcDbObjectId& objId, BSTR* pHandle);
  164. HRESULT AXAUTOEXP
  165. AcAxGetColor(AcDbObjectId& objId, AcColor* pColor);
  166. HRESULT AXAUTOEXP
  167. AcAxPutColor(AcDbObjectId& objId, AcColor color);
  168. HRESULT AXAUTOEXP
  169. AcAxGetTrueColor(AcDbObjectId& objId, IAcadAcCmColor** pColor);
  170. HRESULT AXAUTOEXP
  171. AcAxPutTrueColor(AcDbObjectId& objId, IAcadAcCmColor* color);
  172. HRESULT AXAUTOEXP
  173. AcAxGetLayer(AcDbObjectId& objId, BSTR* pLayer);
  174. HRESULT AXAUTOEXP
  175. AcAxPutLayer(AcDbObjectId& objId, BSTR layer);
  176. HRESULT AXAUTOEXP
  177. AcAxGetLinetype(AcDbObjectId& objId, BSTR* pLinetype);
  178. HRESULT AXAUTOEXP
  179. AcAxPutLinetype(AcDbObjectId& objId, BSTR linetype);
  180. HRESULT AXAUTOEXP
  181. AcAxGetTransparency(AcDbObjectId& objId, BSTR* pTransparency);
  182. HRESULT AXAUTOEXP
  183. AcAxPutTransparency(AcDbObjectId& objId, BSTR transparency);
  184. HRESULT AXAUTOEXP
  185. AcAxGetShadowDisplay(AcDbObjectId& objId, AcShadowDisplayType* pShadowDisplay);
  186. HRESULT AXAUTOEXP
  187. AcAxPutShadowDisplay(AcDbObjectId& objId, AcShadowDisplayType shadowDisplay);
  188. HRESULT AXAUTOEXP
  189. AcAxEnableShadowDisplay(AcDbObjectId& objId, bool* pEnabled);
  190. HRESULT AXAUTOEXP
  191. AcAxGetMaterial(AcDbObjectId& objId, BSTR* pMaterial);
  192. HRESULT AXAUTOEXP
  193. AcAxPutMaterial(AcDbObjectId& objId, BSTR material);
  194. HRESULT AXAUTOEXP
  195. AcAxGetLinetypeScale(AcDbObjectId& objId, double* pLinetypeScale);
  196. HRESULT AXAUTOEXP
  197. AcAxPutLinetypeScale(AcDbObjectId& objId, double linetypeScale);
  198. HRESULT AXAUTOEXP
  199. AcAxGetVisible(AcDbObjectId& objId, VARIANT_BOOL* pVisible);
  200. HRESULT AXAUTOEXP
  201. AcAxPutVisible(AcDbObjectId& objId, VARIANT_BOOL visible);
  202. HRESULT AXAUTOEXP
  203. AcAxArrayPolar(AcDbObjectId& objId, LPDISPATCH pAppDisp, int numObjs,
  204. double fillAngle, VARIANT basePoint, VARIANT* pArrayObjs);
  205. HRESULT AXAUTOEXP
  206. AcAxArrayRectangular(AcDbObjectId& objId, LPDISPATCH pAppDisp, int numRows,
  207. int numCols, int numLvls, double disRows, double disCols,
  208. double disLvls, VARIANT* pArrayObjs);
  209. HRESULT AXAUTOEXP
  210. AcAxHighlight(AcDbObjectId& objId, VARIANT_BOOL bHighlight);
  211. HRESULT AXAUTOEXP
  212. AcAxCopy(AcDbObjectId& objId, LPDISPATCH pAppDisp, LPDISPATCH* pCopyObj,
  213. AcDbObjectId ownerId = AcDbObjectId::kNull);
  214. HRESULT AXAUTOEXP
  215. AcAxMove(AcDbObjectId& objId, VARIANT fromPoint, VARIANT toPoint);
  216. HRESULT AXAUTOEXP
  217. AcAxRotate(AcDbObjectId& objId, VARIANT basePoint, double rotationAngle);
  218. HRESULT AXAUTOEXP
  219. AcAxRotate3D(AcDbObjectId& objId, VARIANT point1, VARIANT point2,
  220. double rotationAngle);
  221. HRESULT AXAUTOEXP
  222. AcAxMirror(AcDbObjectId& objId, LPDISPATCH pAppDisp, VARIANT point1,
  223. VARIANT point2, LPDISPATCH* pMirrorObj);
  224. HRESULT AXAUTOEXP
  225. AcAxMirror3D(AcDbObjectId& objId, LPDISPATCH pAppDisp, VARIANT point1,
  226. VARIANT point2, VARIANT point3, LPDISPATCH* pMirrorObj);
  227. HRESULT AXAUTOEXP
  228. AcAxScaleEntity(AcDbObjectId& objId, VARIANT basePoint, double scaleFactor);
  229. HRESULT AXAUTOEXP
  230. AcAxTransformBy(AcDbObjectId& objId, VARIANT transMatrix);
  231. HRESULT AXAUTOEXP
  232. AcAxUpdate(AcDbObjectId& objId);
  233. HRESULT AXAUTOEXP
  234. AcAxGetBoundingBox(AcDbObjectId& objId, VARIANT* minPoint, VARIANT* maxPoint);
  235. HRESULT AXAUTOEXP
  236. AcAxIntersectWith(AcDbObjectId& objId, LPDISPATCH pEntity,
  237. AcExtendOption option, VARIANT* intPoints);
  238. HRESULT AXAUTOEXP
  239. AcAxGetPlotStyleName(AcDbObjectId& objId, BSTR* plotStyleName);
  240. HRESULT AXAUTOEXP
  241. AcAxPutPlotStyleName(AcDbObjectId& objId, BSTR plotStyleName);
  242. HRESULT AXAUTOEXP
  243. AcAxGetLineWeight(AcDbObjectId& objId, ACAD_LWEIGHT* lineWeight);
  244. HRESULT AXAUTOEXP
  245. AcAxPutLineWeight(AcDbObjectId& objId, ACAD_LWEIGHT lineWeight);
  246. HRESULT AXAUTOEXP
  247. AcAxGetHyperlinks(AcDbObjectId& objId, LPDISPATCH pAppDisp,
  248. IAcadHyperlinks** pHyperlinks);
  249. HRESULT AXAUTOEXP
  250. AcAxHasExtensionDictionary(AcDbObjectId& objId, VARIANT_BOOL* bHasDictionary);
  251. HRESULT AXAUTOEXP
  252. AcAxGetExtensionDictionary(AcDbObjectId& objId, LPDISPATCH pAppDisp,
  253. IAcadDictionary** pExtDictionary);
  254. HRESULT AXAUTOEXP
  255. AcAxGetDatabase(AcDbDatabase* pDb, LPDISPATCH pAppDisp, LPDISPATCH* pDisp);
  256. HRESULT AXAUTOEXP
  257. AcAxGetOwnerId(AcDbObjectId& objId, Adesk::IntDbId * pOwnerId);
  258. #if defined(_WIN64) || defined(_AC64)
  259. Adesk::Int32 AXAUTOEXP
  260. AcAxGetObjectId32(const Adesk::IntDbId& objId);
  261. Adesk::IntDbId AXAUTOEXP
  262. AcAxGetObjectId64(const Adesk::Int32& objId);
  263. #endif
  264. //
  265. // Utility functions
  266. //
  267. HRESULT AXAUTOEXP
  268. RaiseAcAXException(REFGUID iid, HRESULT hRes, DWORD dwException, ...);
  269. HRESULT AXAUTOEXP
  270. RaiseArxException(REFGUID iid, HRESULT hRes, Acad::ErrorStatus es);
  271. HRESULT AXAUTOEXP
  272. AcAxGetIUnknownOfObject(LPUNKNOWN* ppUnk, AcDbObjectId& objId, LPDISPATCH pApp);
  273. HRESULT AXAUTOEXP
  274. AcAxGetIUnknownOfObject(LPUNKNOWN* ppUnk, AcDbObject* pObj, LPDISPATCH pApp);
  275. //
  276. // Common object/entity helper functions using abstract AcAxObjectRef
  277. // instead of AcDbObjectId. Not all methods support non-database resident
  278. // objects and return error codes when called on objects without ObjectIds.
  279. //
  280. HRESULT AXAUTOEXP
  281. AcAxErase(AcAxObjectRef& objRef);
  282. HRESULT AXAUTOEXP
  283. AcAxSetXData(AcAxObjectRef& objRef, VARIANT type, VARIANT data);
  284. HRESULT AXAUTOEXP
  285. AcAxGetXData(AcAxObjectRef& objRef, BSTR bstrName, VARIANT* type, VARIANT* data);
  286. HRESULT AXAUTOEXP
  287. AcAxGetObjectName(AcAxObjectRef& objRef, BSTR* pName);
  288. HRESULT AXAUTOEXP
  289. AcAxGetHandle(AcAxObjectRef& objRef, BSTR* pHandle);
  290. HRESULT AXAUTOEXP
  291. AcAxGetColor(AcAxObjectRef& objRef, AcColor* pColor);
  292. HRESULT AXAUTOEXP
  293. AcAxPutColor(AcAxObjectRef& objRef, AcColor color);
  294. HRESULT AXAUTOEXP
  295. AcAxGetTrueColor(AcAxObjectRef& objRef, IAcadAcCmColor** pColor);
  296. HRESULT AXAUTOEXP
  297. AcAxPutTrueColor(AcAxObjectRef& objRef, IAcadAcCmColor* color);
  298. HRESULT AXAUTOEXP
  299. AcAxGetLayer(AcAxObjectRef& objRef, BSTR* pLayer);
  300. HRESULT AXAUTOEXP
  301. AcAxPutLayer(AcAxObjectRef& objRef, BSTR layer);
  302. HRESULT AXAUTOEXP
  303. AcAxGetLinetype(AcAxObjectRef& objRef, BSTR* pLinetype);
  304. HRESULT AXAUTOEXP
  305. AcAxPutLinetype(AcAxObjectRef& objRef, BSTR linetype);
  306. HRESULT AXAUTOEXP
  307. AcAxGetTransparency(AcAxObjectRef& objRef, BSTR* pTransparency);
  308. HRESULT AXAUTOEXP
  309. AcAxPutTransparency(AcAxObjectRef& objRef, BSTR transparency);
  310. HRESULT AXAUTOEXP
  311. AcAxGetMaterial(AcAxObjectRef& objRef, BSTR* pMaterial);
  312. HRESULT AXAUTOEXP
  313. AcAxPutMaterial(AcAxObjectRef& objRef, BSTR material);
  314. HRESULT AXAUTOEXP
  315. AcAxGetLinetypeScale(AcAxObjectRef& objRef, double* pLinetypeScale);
  316. HRESULT AXAUTOEXP
  317. AcAxPutLinetypeScale(AcAxObjectRef& objRef, double linetypeScale);
  318. HRESULT AXAUTOEXP
  319. AcAxGetShadowDisplay(AcAxObjectRef& objRef, AcShadowDisplayType* pShadowDisplay);
  320. HRESULT AXAUTOEXP
  321. AcAxPutShadowDisplay(AcAxObjectRef& objRef, AcShadowDisplayType shadowDisplay);
  322. HRESULT AXAUTOEXP
  323. AcAxEnableShadowDisplay(AcAxObjectRef& objRef, bool* pEnabled);
  324. HRESULT AXAUTOEXP
  325. AcAxGetVisible(AcAxObjectRef& objRef, VARIANT_BOOL* pVisible);
  326. HRESULT AXAUTOEXP
  327. AcAxPutVisible(AcAxObjectRef& objRef, VARIANT_BOOL visible);
  328. HRESULT AXAUTOEXP
  329. AcAxArrayPolar(AcAxObjectRef& objRef, LPDISPATCH pAppDisp, int numObjs,
  330. double fillAngle, VARIANT basePoint, VARIANT* pArrayObjs);
  331. HRESULT AXAUTOEXP
  332. AcAxArrayRectangular(AcAxObjectRef& objRef, LPDISPATCH pAppDisp, int numRows,
  333. int numCols, int numLvls, double disRows, double disCols,
  334. double disLvls, VARIANT* pArrayObjs);
  335. HRESULT AXAUTOEXP
  336. AcAxHighlight(AcAxObjectRef& objRef, VARIANT_BOOL bHighlight);
  337. HRESULT AXAUTOEXP
  338. AcAxCopy(AcAxObjectRef& objRef, LPDISPATCH pAppDisp, LPDISPATCH* pCopyObj,
  339. AcDbObjectId ownerId = AcDbObjectId::kNull);
  340. HRESULT AXAUTOEXP
  341. AcAxMove(AcAxObjectRef& objRef, VARIANT fromPoint, VARIANT toPoint);
  342. HRESULT AXAUTOEXP
  343. AcAxRotate(AcAxObjectRef& objRef, VARIANT basePoint, double rotationAngle);
  344. HRESULT AXAUTOEXP
  345. AcAxRotate3D(AcAxObjectRef& objRef, VARIANT point1, VARIANT point2,
  346. double rotationAngle);
  347. HRESULT AXAUTOEXP
  348. AcAxMirror(AcAxObjectRef& objRef, LPDISPATCH pAppDisp, VARIANT point1,
  349. VARIANT point2, LPDISPATCH* pMirrorObj);
  350. HRESULT AXAUTOEXP
  351. AcAxMirror3D(AcAxObjectRef& objRef, LPDISPATCH pAppDisp, VARIANT point1,
  352. VARIANT point2, VARIANT point3, LPDISPATCH* pMirrorObj);
  353. HRESULT AXAUTOEXP
  354. AcAxScaleEntity(AcAxObjectRef& objRef, VARIANT basePoint, double scaleFactor);
  355. HRESULT AXAUTOEXP
  356. AcAxTransformBy(AcAxObjectRef& objRef, VARIANT transMatrix);
  357. HRESULT AXAUTOEXP
  358. AcAxUpdate(AcAxObjectRef& objRef);
  359. HRESULT AXAUTOEXP
  360. AcAxGetBoundingBox(AcAxObjectRef& objRef, VARIANT* minPoint, VARIANT* maxPoint);
  361. HRESULT AXAUTOEXP
  362. AcAxIntersectWith(AcAxObjectRef& objRef, LPDISPATCH pEntity,
  363. AcExtendOption option, VARIANT* intPoints);
  364. HRESULT AXAUTOEXP
  365. AcAxGetPlotStyleName(AcAxObjectRef& objRef, BSTR* plotStyleName);
  366. HRESULT AXAUTOEXP
  367. AcAxPutPlotStyleName(AcAxObjectRef& objRef, BSTR plotStyleName);
  368. HRESULT AXAUTOEXP
  369. AcAxGetLineWeight(AcAxObjectRef& objRef, ACAD_LWEIGHT* lineWeight);
  370. HRESULT AXAUTOEXP
  371. AcAxPutLineWeight(AcAxObjectRef& objRef, ACAD_LWEIGHT lineWeight);
  372. HRESULT AXAUTOEXP
  373. AcAxGetHyperlinks(AcAxObjectRef& objRef, LPDISPATCH pAppDisp,
  374. IAcadHyperlinks** pHyperlinks);
  375. HRESULT AXAUTOEXP
  376. AcAxHasExtensionDictionary(AcAxObjectRef& objRef, VARIANT_BOOL* bHasDictionary);
  377. HRESULT AXAUTOEXP
  378. AcAxGetExtensionDictionary(AcAxObjectRef& objRef, LPDISPATCH pAppDisp,
  379. IAcadDictionary** pExtDictionary);
  380. HRESULT AXAUTOEXP
  381. AcAxGetOwnerId(AcAxObjectRef& objRef, Adesk::IntDbId * pOwnerId);
  382. HRESULT AXAUTOEXP
  383. AcAxGet_UIsolineDensity(AcDbObjectId& objId, long* density);
  384. HRESULT AXAUTOEXP
  385. AcAxPut_UIsolineDensity(AcDbObjectId& objId, long density);
  386. HRESULT AXAUTOEXP
  387. AcAxGet_VIsolineDensity(AcDbObjectId& objId, long* density);
  388. HRESULT AXAUTOEXP
  389. AcAxPut_VIsolineDensity(AcDbObjectId& objId, long density);
  390. HRESULT AXAUTOEXP
  391. AcAxGet_WireframeType(AcDbObjectId& objId, AcWireframeType *type);
  392. HRESULT AXAUTOEXP
  393. AcAxPut_WireframeType(AcDbObjectId& objId, AcWireframeType type);
  394. HRESULT AXAUTOEXP
  395. AcAxGetMaintainAssociativity(AcDbObjectId& objId, int *maintainAssoc);
  396. HRESULT AXAUTOEXP
  397. AcAxPutMaintainAssociativity(AcDbObjectId& objId, int maintainAssoc);
  398. HRESULT AXAUTOEXP
  399. AcAxGetShowAssociativity(AcDbObjectId& objId, VARIANT_BOOL* bEnabled);
  400. HRESULT AXAUTOEXP
  401. AcAxPutShowAssociativity(AcDbObjectId& objId, VARIANT_BOOL bEnabled);
  402. HRESULT AXAUTOEXP
  403. AcAxGetEdgeExtensionDistances(AcDbObjectId& objId, VARIANT *extDistances);
  404. HRESULT AXAUTOEXP
  405. AcAxPutEdgeExtensionDistances(AcDbObjectId& objId, VARIANT extDistances);
  406. HRESULT AXAUTOEXP
  407. AcAxGetSurfTrimAssociativity(AcDbObjectId& objId, VARIANT *associative);
  408. HRESULT AXAUTOEXP
  409. AcAxPutSurfTrimAssociativity(AcDbObjectId& objId, VARIANT associative);
  410. #else
  411. DEFINE_GUID(IID_IAcadBaseObject,
  412. 0x5f3c54c0, 0x49e1, 0x11cf, 0x93, 0xd5, 0x8, 0x0, 0x9, 0x9e, 0xb3, 0xb7);
  413. /* Definition of interface: IAcadBaseObject */
  414. #undef INTERFACE
  415. #define INTERFACE IAcadBaseObject
  416. //interface DECLSPEC_UUID("5F3C54C0-49E1-11cf-93D5-0800099EB3B7")
  417. interface IAcadBaseObject : public IUnknown
  418. {
  419. /* IUnknown methods */
  420. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  421. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  422. STDMETHOD_(ULONG, Release)(THIS) PURE;
  423. /* IAcadBaseObject methods */
  424. STDMETHOD(SetObjectId)(THIS_ AcDbObjectId& objId,
  425. AcDbObjectId ownerId = AcDbObjectId::kNull,
  426. ACHAR* keyName = NULL) PURE;
  427. STDMETHOD(GetObjectId)(THIS_ AcDbObjectId* objId) PURE;
  428. STDMETHOD(Clone)(THIS_ AcDbObjectId ownerId, LPUNKNOWN* pUnkClone) PURE;
  429. STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE;
  430. STDMETHOD(NullObjectId)(THIS) PURE;
  431. STDMETHOD(OnModified)(THIS) PURE;
  432. };
  433. typedef IAcadBaseObject* LPACADBASEOBJECT;
  434. // {ADAAAEC4-C7FE-11d5-8D60-0010830243CE}
  435. DEFINE_GUID(IID_IAcadBaseObject2,
  436. 0xadaaaec4, 0xc7fe, 0x11d5, 0x8d, 0x60, 0x0, 0x10, 0x83, 0x2, 0x43, 0xce);
  437. /* Definition of interface: IAcadBaseObject2 */
  438. //interface DECLSPEC_UUID("ADAAAEC4-C7FE-11d5-8D60-0010830243CE")
  439. interface IAcadBaseObject2 : public IUnknown
  440. {
  441. /* IUnknown methods */
  442. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  443. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  444. STDMETHOD_(ULONG, Release)(THIS) PURE;
  445. /* IAcadBaseObject2 methods */
  446. STDMETHOD(ForceDbResident)(THIS_ VARIANT_BOOL* forceDbResident) PURE;
  447. STDMETHOD(AddToDb)(THIS_ AcDbObjectId& objId,
  448. AcDbObjectId ownerId = AcDbObjectId::kNull,
  449. ACHAR* keyName = NULL) PURE;
  450. STDMETHOD(CreateObject)(THIS_ AcDbObjectId ownerId = AcDbObjectId::kNull,
  451. ACHAR* keyName = NULL) PURE;
  452. STDMETHOD(ObjectExists)(THIS_ VARIANT_BOOL* objectExists) PURE;
  453. STDMETHOD(SetObject)(THIS_ AcDbObject*& pObj) PURE;
  454. STDMETHOD(GetObject)(THIS_ AcDbObject*& pObj) PURE;
  455. STDMETHOD(OnModified)(THIS_ DISPID = DISPID_UNKNOWN) PURE;
  456. };
  457. typedef IAcadBaseObject2* LPACADBASEOBJECT2;
  458. DEFINE_GUID(IID_IAcadBaseDatabase,
  459. 0xcb1488c4, 0x2bec, 0x11d2, 0xb6, 0x7b, 0x0, 0x60, 0xb0, 0x87, 0xe2, 0x35);
  460. /* Definition of interface: IAcadBaseDatabase */
  461. // interface DECLSPEC_UUID("CB1488C4-2BEC-11d2-B67B-0060B087E235")
  462. interface IAcadBaseDatabase : public IUnknown
  463. {
  464. /* IUnknown methods */
  465. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  466. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  467. STDMETHOD_(ULONG, Release)(THIS) PURE;
  468. /* IAcadBaseObject methods */
  469. STDMETHOD(SetDatabase)(THIS_ AcDbDatabase*& pDb) PURE;
  470. STDMETHOD(GetDatabase)(THIS_ AcDbDatabase** pDb) PURE;
  471. STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE;
  472. };
  473. typedef IAcadBaseDatabase* LPACADBASEDATABASE;
  474. // Common object/entity helper functions are found in axdbUtilities for
  475. // the Mac product
  476. #endif // _ADESK_WINDOWS_
  477. #endif