dbmleader.h 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #ifndef __DBMLEADER_H__
  11. #define __DBMLEADER_H__
  12. #pragma once
  13. #include "dbgrip.h"
  14. #include "dbmleaderstyle.h"
  15. #include "dbents.h"
  16. const int MAX_LEADER_NUMBER = 5000;
  17. const int MAX_LEADERLINE_NUMBER = 5000;
  18. class AcDbMLeaderObjectContextData;
  19. ////////////////////////////////////////////////////////////////////////
  20. // class AcDbMLeader
  21. ////////////////////////////////////////////////////////////////////////
  22. /// <summary>
  23. /// This class is the main class used for the multiple leader object.
  24. /// </summary>
  25. ///
  26. /// <remarks>
  27. /// </remarks>
  28. ///
  29. class AcDbMLeader : public AcDbEntity
  30. {
  31. public:
  32. /// <summary>
  33. /// This enum is the move type use for move mleader object.
  34. /// </summary>
  35. ///
  36. enum MoveType {
  37. /// <summary>
  38. /// move all mleader points
  39. /// </summary>
  40. ///
  41. /// <value>
  42. /// 0
  43. /// </value>
  44. kMoveAllPoints = 0,
  45. /// <summary>
  46. /// move all mleader points except leaderline's arrowhead points
  47. /// </summary>
  48. ///
  49. /// <value>
  50. /// 1
  51. /// </value>
  52. kMoveAllExceptArrowHeaderPoints = 1,
  53. /// <summary>
  54. /// move dogleg and mleader content points
  55. /// </summary>
  56. ///
  57. /// <value>
  58. /// 2
  59. /// </value>
  60. kMoveContentAndDoglegPoints = 2
  61. };
  62. /// <summary>
  63. /// This enum is the gs mark of mleader object.
  64. /// </summary>
  65. ///
  66. enum gsMarkType {
  67. /// <summary>
  68. /// Null gs mark.
  69. /// </summary>
  70. ///
  71. /// <value>
  72. /// 0
  73. /// </value>
  74. kNone = 0,
  75. /// <summary>
  76. /// arrow symbol gs mark.
  77. /// </summary>
  78. ///
  79. /// <value>
  80. /// from 1 to MAX_LEADERLINE_NUMBER
  81. /// </value>
  82. kArrowMark = 1,
  83. /// <summary>
  84. /// leaderLine gs mark.
  85. /// </summary>
  86. ///
  87. /// <value>
  88. /// from kArrowMark + MAX_LEADERLINE_NUMBER to MAX_LEADERLINE_NUMBER
  89. /// </value>
  90. kLeaderLineMark = kArrowMark + MAX_LEADERLINE_NUMBER,
  91. /// <summary>
  92. /// dogleg gs mark.
  93. /// </summary>
  94. ///
  95. /// <value>
  96. /// from kLeaderLineMark + MAX_LEADERLINE_NUMBE to MAX_LEADER_NUMBER
  97. /// </value>
  98. kDoglegMark = kLeaderLineMark + MAX_LEADERLINE_NUMBER,
  99. /// <summary>
  100. /// mtext content gs mark.
  101. /// </summary>
  102. ///
  103. /// <value>
  104. /// kDoglegMark + MAX_LEADER_NUMBER
  105. /// </value>
  106. kMTextMark = kDoglegMark + MAX_LEADER_NUMBER,
  107. /// <summary>
  108. /// mtext underline content gs mark, include text frame if mleader has.
  109. /// </summary>
  110. ///
  111. /// <value>
  112. /// kMTextMark + 1
  113. /// </value>
  114. kMTextUnderLineMark = kMTextMark + 1,
  115. /// <summary>
  116. /// Tolerance content gs mark
  117. /// </summary>
  118. ///
  119. /// <value>
  120. /// kMTextUnderLineMark + 1
  121. /// </value>
  122. kToleranceMark = kMTextUnderLineMark + 1,
  123. /// <summary>
  124. /// Block content gs mark
  125. /// </summary>
  126. ///
  127. /// <value>
  128. /// kToleranceMark + 1
  129. /// </value>
  130. kBlockMark = kToleranceMark + 1,
  131. /// <summary>
  132. /// BlockAttribute content gs mark
  133. /// </summary>
  134. ///
  135. /// <value>
  136. /// from kBlockMark + 1 to 2^(8*sizeof(unsigned short))
  137. /// </value>
  138. kBlockAttribute = kBlockMark + 1
  139. };
  140. /// <summary>
  141. /// This enum is the properties could be overrided in mleader object.
  142. /// </summary>
  143. ///
  144. enum PropertyOverrideType {
  145. /// <summary>
  146. /// type of leaderLine
  147. /// </summary>
  148. ///
  149. /// <value>
  150. /// 0
  151. /// </value>
  152. kLeaderLineType = 0,
  153. /// <summary>
  154. /// color of leaderLine
  155. /// </summary>
  156. ///
  157. /// <value>
  158. /// 1
  159. /// </value>
  160. kLeaderLineColor = 1,
  161. /// <summary>
  162. /// line type id of leaderLine
  163. /// </summary>
  164. ///
  165. /// <value>
  166. /// 2
  167. /// </value>
  168. kLeaderLineTypeId = 2,
  169. /// <summary>
  170. /// line weight id of leaderLine
  171. /// </summary>
  172. ///
  173. /// <value>
  174. /// 3
  175. /// </value>
  176. kLeaderLineWeight = 3,
  177. /// <summary>
  178. /// if enable landing
  179. /// </summary>
  180. ///
  181. /// <value>
  182. /// 4
  183. /// </value>
  184. kEnableLanding = 4,
  185. /// <summary>
  186. /// landing gap
  187. /// </summary>
  188. ///
  189. /// <value>
  190. /// 5
  191. /// </value>
  192. kLandingGap = 5,
  193. /// <summary>
  194. /// if enable dogleg
  195. /// </summary>
  196. ///
  197. /// <value>
  198. /// 6
  199. /// </value>
  200. kEnableDogleg = 6,
  201. /// <summary>
  202. /// dogleg length
  203. /// </summary>
  204. ///
  205. /// <value>
  206. /// 7
  207. /// </value>
  208. kDoglegLength = 7,
  209. /// <summary>
  210. /// block id of arrowSymbol
  211. /// </summary>
  212. ///
  213. /// <value>
  214. /// 8
  215. /// </value>
  216. kArrowSymbolId = 8,
  217. /// <summary>
  218. /// size of arrowSymbol
  219. /// </summary>
  220. ///
  221. /// <value>
  222. /// 9
  223. /// </value>
  224. kArrowSize = 9,
  225. /// <summary>
  226. /// content type of mleader
  227. /// </summary>
  228. ///
  229. /// <value>
  230. /// 10
  231. /// </value>
  232. kContentType = 10,
  233. /// <summary>
  234. /// text style id of mtext content
  235. /// </summary>
  236. ///
  237. /// <value>
  238. /// 11
  239. /// </value>
  240. kTextStyleId = 11,
  241. /// <summary>
  242. /// text left attachment type of mtext content
  243. /// </summary>
  244. ///
  245. /// <value>
  246. /// 12
  247. /// </value>
  248. kTextLeftAttachmentType = 12,
  249. /// <summary>
  250. /// text angle type of mtext content
  251. /// </summary>
  252. ///
  253. /// <value>
  254. /// 13
  255. /// </value>
  256. kTextAngleType = 13,
  257. /// <summary>
  258. /// text alignment type of mtext content
  259. /// </summary>
  260. ///
  261. /// <value>
  262. /// 14
  263. /// </value>
  264. kTextAlignmentType = 14,
  265. /// <summary>
  266. /// text color of mtext content
  267. /// </summary>
  268. ///
  269. /// <value>
  270. /// 15
  271. /// </value>
  272. kTextColor = 15,
  273. /// <summary>
  274. /// text height of mtext content
  275. /// </summary>
  276. ///
  277. /// <value>
  278. /// 16
  279. /// </value>
  280. kTextHeight = 16,
  281. /// <summary>
  282. /// if enable frame text
  283. /// </summary>
  284. ///
  285. /// <value>
  286. /// 17
  287. /// </value>
  288. kEnableFrameText = 17,
  289. /// <summary>
  290. /// if use default mtext defined in mleaderStyle
  291. /// </summary>
  292. ///
  293. /// <value>
  294. /// 18
  295. /// </value>
  296. kDefaultMText = 18,
  297. /// <summary>
  298. /// block table record id of block content
  299. /// </summary>
  300. ///
  301. /// <value>
  302. /// 19
  303. /// </value>
  304. kBlockId = 19,
  305. /// <summary>
  306. /// color of block content
  307. /// </summary>
  308. ///
  309. /// <value>
  310. /// 20
  311. /// </value>
  312. kBlockColor = 20,
  313. /// <summary>
  314. /// scale of block content
  315. /// </summary>
  316. ///
  317. /// <value>
  318. /// 21
  319. /// </value>
  320. kBlockScale = 21,
  321. /// <summary>
  322. /// rotation of block content
  323. /// </summary>
  324. ///
  325. /// <value>
  326. /// 22
  327. /// </value>
  328. kBlockRotation = 22,
  329. /// <summary>
  330. /// connection type of block content
  331. /// </summary>
  332. ///
  333. /// <value>
  334. /// 23
  335. /// </value>
  336. kBlockConnectionType = 23,
  337. /// <summary>
  338. /// scale of mleader
  339. /// </summary>
  340. ///
  341. /// <value>
  342. /// 24
  343. /// </value>
  344. kScale = 24,
  345. /// <summary>
  346. /// text right attachment type of mtext content
  347. /// </summary>
  348. ///
  349. /// <value>
  350. /// 25
  351. /// </value>
  352. kTextRightAttachmentType = 25,
  353. /// <summary>
  354. /// text switch alignment type of mtext content
  355. /// if set this override, drag grip point of mleader will not changed text alignment type
  356. /// </summary>
  357. ///
  358. /// <value>
  359. /// 26
  360. /// </value>
  361. kTextSwitchAlignmentType = 26,
  362. /// <summary>
  363. /// text attachment direction of mtext content
  364. /// </summary>
  365. ///
  366. /// <value>
  367. /// 27
  368. /// </value>
  369. kTextAttachmentDirection = 27,
  370. /// <summary>
  371. /// text top attachment type of mtext content
  372. /// </summary>
  373. ///
  374. /// <value>
  375. /// 28
  376. /// </value>
  377. kTextTopAttachmentType = 28,
  378. /// <summary>
  379. /// text bottom attachment type of mtext content
  380. /// </summary>
  381. ///
  382. /// <value>
  383. /// 29
  384. /// </value>
  385. kTextBottomAttachmentType = 29,
  386. /// <summary>
  387. /// automatically extend the horizontal leader line to text
  388. /// </summary>
  389. ///
  390. /// <value>
  391. /// 30
  392. /// </value>
  393. kExtendLeaderToText = 30,
  394. //add more here...
  395. /// <summary>
  396. /// bitset size
  397. /// </summary>
  398. ///
  399. /// <value>
  400. /// 31
  401. /// </value>
  402. kSize = kExtendLeaderToText + 1
  403. };
  404. /// <summary>
  405. /// Default constructor.
  406. /// </summary>
  407. ///
  408. /// <remarks>
  409. /// Default constructor.
  410. /// </remarks>
  411. ///
  412. AcDbMLeader();
  413. /// <summary>
  414. /// Default destructor.
  415. /// </summary>
  416. ///
  417. /// <remarks>
  418. /// Default destructor.
  419. /// </remarks>
  420. ///
  421. ~AcDbMLeader();
  422. ACDB_DECLARE_MEMBERS(AcDbMLeader);
  423. /// <summary>
  424. /// Used to read in an AcDbMLeader's data from a DWG file.
  425. /// </summary>
  426. ///
  427. /// <param name="filer">
  428. /// Actual filer used to read in an AcDbMLeader's data from a DWG file.
  429. /// </param>
  430. ///
  431. /// <remarks>
  432. /// Used to read in an AcDbMLeader's data from a DWG file.
  433. /// </remarks>
  434. ///
  435. virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* filer);
  436. /// <summary>
  437. /// Used to persist the AcDbMLeader's data to a DWG file.
  438. /// </summary>
  439. ///
  440. /// <param name="filer">
  441. /// Actual filer used to persist the AcDbMLeader's data to a DWG file.
  442. /// </param>
  443. ///
  444. /// <remarks>
  445. /// Used to persist the AcDbMLeader's data to a DWG file.
  446. /// </remarks>
  447. ///
  448. virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
  449. /// <summary>
  450. /// Used to read in an AcDbMLeader's data from a DXF file.
  451. /// </summary>
  452. ///
  453. /// <param name="filer">
  454. /// Actual filer used to read in an AcDbMLeader's data from a DXF file.
  455. /// </param>
  456. ///
  457. /// <remarks>
  458. /// Used to read in an AcDbMLeader's data from a DXF file.
  459. /// </remarks>
  460. ///
  461. virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* filer);
  462. /// <summary>
  463. /// Used to persist the AcDbMLeader's data to a DXF file.
  464. /// </summary>
  465. ///
  466. /// <param name="filer">
  467. /// Actual filer used to persist the AcDbMLeader's data to a DXF file.
  468. /// </param>
  469. ///
  470. /// <remarks>
  471. /// Used to persist the AcDbMLeader's data to a DXF file.
  472. /// </remarks>
  473. ///
  474. virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;
  475. /// <summary>
  476. /// Called from within close() before anything else is done.
  477. /// </summary>
  478. ///
  479. /// <returns>
  480. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  481. /// </returns>
  482. ///
  483. virtual Acad::ErrorStatus subClose ();
  484. /// <summary>
  485. /// Called from within erase() before anything else is done.
  486. /// </summary>
  487. ///
  488. /// <param name="erasing">
  489. /// Passed in copy of the erasing argument that was passed into the erase() function call
  490. /// that triggered this subErase() call.
  491. /// </param>
  492. ///
  493. /// <returns>
  494. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  495. /// </returns>
  496. ///
  497. virtual Acad::ErrorStatus subErase (Adesk::Boolean erasing);
  498. /// <summary>
  499. /// Called whenever the object sending notification was closed.
  500. /// </summary>
  501. ///
  502. /// <param name="dbObjId">
  503. /// Passed in objectId of the object sending the notification.
  504. /// </param>
  505. ///
  506. virtual void objectClosed (const AcDbObjectId dbObjId);
  507. /// <summary>
  508. /// Called whenever the object sending notification has been modified and the object is being closed.
  509. /// </summary>
  510. ///
  511. /// <param name="dbObj">
  512. /// Passed in pointer to object which has been modified.
  513. /// </param>
  514. ///
  515. virtual void modified (const AcDbObject* dbObj);
  516. /// <summary>
  517. /// Sets input propertyType is override or not.
  518. /// </summary>
  519. ///
  520. /// <param name="propertyType">
  521. /// Input PropertyOverrideType which will be set.
  522. /// </param>
  523. /// <param name="isOverride">
  524. /// Input bool indicate whether overrided or not.
  525. /// </param>
  526. ///
  527. /// <returns>
  528. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  529. /// </returns>
  530. ///
  531. Acad::ErrorStatus setOverride (PropertyOverrideType propertyType,
  532. bool isOverride = true);
  533. /// <summary>
  534. /// Test if the propertyType has been overrided.
  535. /// </summary>
  536. ///
  537. /// <param name="propertyType">
  538. /// Input PropertyOverrideType to test if it is overrided.
  539. /// </param>
  540. ///
  541. /// <returns>
  542. /// Returns true if the input PropertyOverrideType is override by this mleader object.
  543. /// Otherwise, return false.
  544. /// </returns>
  545. ///
  546. bool isOverride (PropertyOverrideType propertyType) const;
  547. /// <summary>
  548. /// Sets mleader scale, it will affect arrowhead size and content scale.
  549. /// </summary>
  550. ///
  551. /// <param name="scale">
  552. /// Input scale value.
  553. /// </param>
  554. ///
  555. /// <returns>
  556. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  557. /// </returns>
  558. ///
  559. /// <remarks>
  560. /// This function will set PropertyOverrideType kScale override.
  561. /// </remarks>
  562. ///
  563. Acad::ErrorStatus setScale (double scale);
  564. /// <summary>
  565. /// Gets mleader scale value.
  566. /// </summary>
  567. ///
  568. /// <returns>
  569. /// Returns mleader scale value.
  570. /// </returns>
  571. ///
  572. double scale () const;
  573. /// <summary>
  574. /// Gets attribute in block content determined by attribute definition id.
  575. /// </summary>
  576. ///
  577. /// <param name="attdefId">
  578. /// Input attribute definition id.
  579. /// </param>
  580. /// <param name="pAtt">
  581. /// OutPut attribute object determined by attribute definition id.
  582. /// </param>
  583. ///
  584. /// <returns>
  585. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  586. /// </returns>
  587. ///
  588. /// <remarks>
  589. /// Attribute define id is the AcDbAttributeDefinition object id
  590. /// that is defined in AcDbBlockTableRecord refernced by this mleader object.
  591. /// The attribute object should be deleted when it is no longer needed.
  592. /// </remarks>
  593. ///
  594. Acad::ErrorStatus getBlockAttributeValue(const AcDbObjectId& attdefId,
  595. AcDbAttribute*& pAtt) const;
  596. /// <summary>
  597. /// Set attribute in block content with attribute definition id.
  598. /// </summary>
  599. ///
  600. /// <param name="attdefId">
  601. /// Input attribute definition id.
  602. /// </param>
  603. /// <param name="pAtt">
  604. /// Iutputs attribute.
  605. /// </param>
  606. ///
  607. /// <returns>
  608. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  609. /// </returns>
  610. ///
  611. Acad::ErrorStatus setBlockAttributeValue(const AcDbObjectId& attdefId,
  612. const AcDbAttribute* pAtt);
  613. /// <remarks>
  614. /// Deprecated: This method will be removed in a future release.
  615. /// Instead, use the method:
  616. /// <code>
  617. /// Acad::ErrorStatus getBlockAttributeValue(const AcDbObjectId&amp; attdefId, AcDbAttribute*&amp; pAtt) const;
  618. /// </code>
  619. /// </remarks>
  620. Acad::ErrorStatus getBlockAttributeValue (const AcDbObjectId& attdefId,
  621. ACHAR*& value) const;
  622. /// <remarks>
  623. /// Deprecated: This method will be removed in a future release.
  624. /// Instead, use the method:
  625. /// <code>
  626. /// Acad::ErrorStatus setBlockAttributeValue(const AcDbObjectId&amp; attdefId, AcDbAttribute*&amp; pAtt) const;
  627. /// </code>
  628. /// </remarks>
  629. Acad::ErrorStatus setBlockAttributeValue (const AcDbObjectId& attdefId,
  630. const ACHAR* value);
  631. /// <summary>
  632. /// Gets the WCS plane which the MLeader resides on.
  633. /// </summary>
  634. ///
  635. /// <returns>
  636. /// Returns the WCS plane which the MLeader resides on.
  637. /// </returns>
  638. ///
  639. AcGePlane plane () const;
  640. /// <summary>
  641. /// Sets the WCS plane which the MLeader resides on.
  642. /// </summary>
  643. ///
  644. /// <param name="plane">
  645. /// Input desired plane within which the mleader will reside.
  646. /// </param>
  647. ///
  648. /// <remarks>
  649. /// Sets the plane that will contain the mleader object.
  650. /// This leader's data members will be updated to reflect the change of plane.
  651. /// To do this, a transformation matrix will be created that will translate all points
  652. /// from the current plane's coordinate system to the new plane's coordinate
  653. /// system--a projection is not used.
  654. /// If doesn't set plane, mleader use default AcGePlane::kXYPlane
  655. /// </remarks>
  656. ///
  657. void setPlane (const AcGePlane& plane);
  658. /// <summary>
  659. /// Gets the normal of the plane which the MLeader resides on.
  660. /// </summary>
  661. ///
  662. /// <returns>
  663. /// Returns the unit normal vector (in WCS coordinates) of the plane that contains the leader.
  664. /// </returns>
  665. ///
  666. AcGeVector3d normal () const;
  667. /// <summary>
  668. /// Moves mleader according to input vector.
  669. /// </summary>
  670. ///
  671. /// <param name="vector">
  672. /// Input vector indicate direction and distance the mleader will be moved.
  673. /// </param>
  674. /// <param name="moveType">
  675. /// Input MoveType indicate how the mleader will be moved. This enumeration define in MoveType.
  676. /// </param>
  677. /// <param name="bAutoSwitchDogleg">
  678. /// Input bool to indicate whether automatically switch leader lines after mleader is moved.
  679. /// </param>
  680. ///
  681. /// <returns>
  682. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  683. /// </returns>
  684. ///
  685. Acad::ErrorStatus moveMLeader (const AcGeVector3d& vector,
  686. MoveType moveType,
  687. bool bAutoSwitchDogleg = true);
  688. /// <summary>
  689. /// Gets the extents of content in this mleader object.
  690. /// </summary>
  691. ///
  692. /// <param name="extents">
  693. /// Output content's extents.
  694. /// </param>
  695. ///
  696. /// <returns>
  697. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  698. /// </returns>
  699. ///
  700. Acad::ErrorStatus getContentGeomExtents(AcDbExtents& extents) const;
  701. /// <remarks>
  702. /// Deprecated: This method will be removed in a future release.
  703. /// Instead, use the method:
  704. /// <code>
  705. /// Acad::ErrorStatus getLeaderIndexes(...) const;
  706. /// </code>
  707. /// </remarks>
  708. int numLeaders () const;
  709. /// <summary>
  710. /// Gets the indexes of leaders.
  711. /// </summary>
  712. ///
  713. /// <param name="leaderIndexes">
  714. /// Output indexes of leaders.
  715. /// </param>
  716. ///
  717. /// <returns>
  718. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  719. /// </returns>
  720. ///
  721. Acad::ErrorStatus getLeaderIndexes(AcArray<int>& leaderIndexes) const;
  722. /// <summary>
  723. /// Adds a new leader cluster to this AcDbMLeader object.
  724. /// </summary>
  725. ///
  726. /// <param name="leaderIndex">
  727. /// Output the index of added leader cluster.
  728. /// </param>
  729. ///
  730. /// <returns>
  731. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  732. /// </returns>
  733. ///
  734. /// <remarks>
  735. /// A leader cluster is made up by a dog-leg and some leaderLines.
  736. /// </remarks>
  737. ///
  738. Acad::ErrorStatus addLeader (int& leaderIndex);
  739. /// <summary>
  740. /// Removes the leader cluster with specified index.
  741. /// </summary>
  742. ///
  743. /// <param name="leaderIndex">
  744. /// Input the index of the leader to be removed.
  745. /// </param>
  746. ///
  747. /// <returns>
  748. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  749. /// </returns>
  750. ///
  751. /// <remarks>
  752. /// A leader cluster is made up by a dog-leg and some leaderLines.
  753. /// </remarks>
  754. ///
  755. Acad::ErrorStatus removeLeader (int leaderIndex);
  756. /// <remarks>
  757. /// Deprecated: This method will be removed in a future release.
  758. /// Instead, use the method:
  759. /// <code>
  760. /// Acad::ErrorStatus getLeaderLineIndexes(...) const;
  761. /// </code>
  762. /// </remarks>
  763. int numLeaderLines () const;
  764. /// <summary>
  765. /// Gets the indexes of leaderLines.
  766. /// </summary>
  767. ///
  768. /// <param name="leaderIndexes">
  769. /// Output indexes of leadersLines.
  770. /// </param>
  771. ///
  772. /// <returns>
  773. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  774. /// </returns>
  775. ///
  776. Acad::ErrorStatus getLeaderLineIndexes(AcArray<int>& leaderLineIndexes) const;
  777. /// <summary>
  778. /// Adds a leaderline to the leader cluster with specified index.
  779. /// </summary>
  780. ///
  781. /// <param name="leaderIndex">
  782. /// Input index of the leader cluster.
  783. /// </param>
  784. /// <param name="leaderLineIndex">
  785. /// Output the index of the added leader line.
  786. /// </param>
  787. ///
  788. /// <returns>
  789. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  790. /// </returns>
  791. ///
  792. /// <remarks>
  793. /// A leaderLine cluster is made up by leaderline segment and arrowhead.
  794. /// </remarks>
  795. ///
  796. Acad::ErrorStatus addLeaderLine (int leaderIndex, int& leaderLineIndex);
  797. /// <summary>
  798. /// Adds a new leader line to this mleader object determined by input point
  799. /// which will be the first point of new leaderline.
  800. /// </summary>
  801. ///
  802. /// <param name="point">
  803. /// Input point of the first(head) vertex of the new leader line.
  804. /// </param>
  805. /// <param name="leaderLineIndex">
  806. /// Output the index of added leader line.
  807. /// </param>
  808. ///
  809. /// <returns>
  810. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  811. /// </returns>
  812. ///
  813. /// <remarks>
  814. /// A leaderLine cluster is made up by leaderline segment and arrowhead.
  815. /// This function can be invoked when the mleader already have a content.
  816. /// If the input point is on the side of exist leader cluster,
  817. /// a new leaderline will be added, the new leaderline's last point have already exist,
  818. /// the input point will be the first point of the new leaderline.
  819. /// If no leader cluster exists on the input point side,
  820. /// a new leader will be added automatically, then add a new leaderline.
  821. /// </remarks>
  822. ///
  823. Acad::ErrorStatus addLeaderLine (const AcGePoint3d& point, int& leaderLineIndex);
  824. /// <summary>
  825. /// Removes the leader line with specified index.
  826. /// </summary>
  827. ///
  828. /// <param name="leaderLineIndex">
  829. /// Input the index of leaderLine cluster.
  830. /// </param>
  831. ///
  832. /// <returns>
  833. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  834. /// </returns>
  835. ///
  836. /// <remarks>
  837. /// A leaderLine cluster is made up by leaderline segment and arrowhead.
  838. /// If after remove lieaderine, the leader has no leaderline, the leader will be removed too.
  839. /// </remarks>
  840. ///
  841. Acad::ErrorStatus removeLeaderLine (int leaderLineIndex);
  842. /// <summary>
  843. /// Inserts a vertex to the leader line with specified index as new leader head.
  844. /// </summary>
  845. ///
  846. /// <param name="leaderLineIndex">
  847. /// Input index of the leader line.
  848. /// </param>
  849. /// <param name="point">
  850. /// Input the vertex position.
  851. /// </param>
  852. ///
  853. /// <returns>
  854. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  855. /// </returns>
  856. ///
  857. Acad::ErrorStatus addFirstVertex (int leaderLineIndex, const AcGePoint3d& point);
  858. /// <summary>
  859. /// Removes the head of the leader line with specified index.
  860. /// The second vertex in this leader line becomes the new head.
  861. /// </summary>
  862. ///
  863. /// <param name="leaderLineIndex">
  864. /// Input index of the leader line.
  865. /// </param>
  866. ///
  867. /// <returns>
  868. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  869. /// </returns>
  870. ///
  871. Acad::ErrorStatus removeFirstVertex (int leaderLineIndex);
  872. /// <summary>
  873. /// Gets head point of specified leader line.
  874. /// </summary>
  875. ///
  876. /// <param name="leaderLineIndex">
  877. /// Input index of the leader line.
  878. /// </param>
  879. /// <param name="point">
  880. /// Output the leaderline head point.
  881. /// </param>
  882. ///
  883. /// <returns>
  884. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  885. /// </returns>
  886. ///
  887. Acad::ErrorStatus getFirstVertex (int leaderLineIndex, AcGePoint3d& point) const;
  888. /// <summary>
  889. /// Sets the leader head with specified point.
  890. /// </summary>
  891. ///
  892. /// <param name="leaderLineIndex">
  893. /// Input index of the leader line.
  894. /// </param>
  895. /// <param name="point">
  896. /// Iutput the leaderline head point.
  897. /// </param>
  898. ///
  899. /// <returns>
  900. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  901. /// </returns>
  902. ///
  903. Acad::ErrorStatus setFirstVertex (int leaderLineIndex, const AcGePoint3d& point);
  904. /// <summary>
  905. /// Appends a vertex to the specified leader line as the new leader tail.
  906. /// </summary>
  907. ///
  908. /// <param name="leaderLineIndex">
  909. /// Input index of the leader line.
  910. /// </param>
  911. /// <param name="point">
  912. /// Input the vertex position.
  913. /// </param>
  914. ///
  915. /// <returns>
  916. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  917. /// </returns>
  918. ///
  919. Acad::ErrorStatus addLastVertex (int leaderLineIndex, const AcGePoint3d& point);
  920. /// <summary>
  921. /// Removes the leader tail of specified leader line.
  922. /// </summary>
  923. ///
  924. /// <param name="leaderLineIndex">
  925. /// Input index of the leader line.
  926. /// </param>
  927. ///
  928. /// <returns>
  929. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  930. /// </returns>
  931. ///
  932. Acad::ErrorStatus removeLastVertex (int leaderLineIndex);
  933. /// <summary>
  934. /// Gets the tail vertex position of specified leader line.
  935. /// </summary>
  936. ///
  937. /// <param name="leaderLineIndex">
  938. /// Input index of the leader line.
  939. /// </param>
  940. /// <param name="point">
  941. /// Output the leaderline tail point.
  942. /// </param>
  943. ///
  944. /// <returns>
  945. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  946. /// </returns>
  947. ///
  948. Acad::ErrorStatus getLastVertex (int leaderLineIndex, AcGePoint3d& point) const;
  949. /// <summary>
  950. /// Sets leader tail with specified point.
  951. /// </summary>
  952. ///
  953. /// <param name="leaderLineIndex">
  954. /// Input index of the leader line.
  955. /// </param>
  956. /// <param name="point">
  957. /// Iutput the leaderline tail point.
  958. /// </param>
  959. ///
  960. /// <returns>
  961. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  962. /// </returns>
  963. ///
  964. Acad::ErrorStatus setLastVertex (int leaderLineIndex, const AcGePoint3d& point);
  965. /// <summary>
  966. /// Gets the number of vertices in the specified leader line.
  967. /// </summary>
  968. ///
  969. /// <param name="leaderLineIndex">
  970. /// Input index of the leader line.
  971. /// </param>
  972. /// <param name="num">
  973. /// Ouput the number of vertices in the leader line.
  974. /// </param>
  975. ///
  976. /// <returns>
  977. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  978. /// </returns>
  979. ///
  980. Acad::ErrorStatus numVertices (int leaderLineIndex, int& num) const;
  981. /// <summary>
  982. /// Sets the vertex with specified index in the leader line with a new position specified by point.
  983. /// </summary>
  984. ///
  985. /// <param name="leaderLineIndex">
  986. /// Input index of the leader line.
  987. /// </param>
  988. /// <param name="index">
  989. /// Input the index of vertex.
  990. /// </param>
  991. /// <param name="point">
  992. /// Input the new position of this vertex.
  993. /// </param>
  994. ///
  995. /// <returns>
  996. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  997. /// </returns>
  998. ///
  999. Acad::ErrorStatus setVertex (int leaderLineIndex, int index, const AcGePoint3d& point);
  1000. /// <summary>
  1001. /// Gets position of the vertex with specified index in the leader line
  1002. /// with a new position specified by point.
  1003. /// </summary>
  1004. ///
  1005. /// <param name="leaderLineIndex">
  1006. /// Input index of the leader line.
  1007. /// </param>
  1008. /// <param name="index">
  1009. /// Input the index of vertex.
  1010. /// </param>
  1011. /// <param name="point">
  1012. /// Ouput position of the vertex.
  1013. /// </param>
  1014. ///
  1015. /// <returns>
  1016. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1017. /// </returns>
  1018. ///
  1019. Acad::ErrorStatus getVertex (int leaderLineIndex, int index, AcGePoint3d& point) const;
  1020. /// <summary>
  1021. /// Gets the index of leader cluster which the specified leader line is in.
  1022. /// </summary>
  1023. ///
  1024. /// <param name="leaderLineIndex">
  1025. /// Input index of the leader line.
  1026. /// </param>
  1027. /// <param name="leaderIndex">
  1028. /// Output index of leader owned the input leaderline.
  1029. /// </param>
  1030. ///
  1031. /// <returns>
  1032. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1033. /// </returns>
  1034. ///
  1035. Acad::ErrorStatus getLeaderIndex (int leaderLineIndex, int& leaderIndex) const;
  1036. /// <summary>
  1037. /// Gets the indexes of leaderlines of the specific leader.
  1038. /// </summary>
  1039. ///
  1040. /// <param name="leaderIndex">
  1041. /// Input leader index.
  1042. /// </param>
  1043. /// <param name="leaderLineIndexes">
  1044. /// Output indexes of leaderlines owned by the input leader.
  1045. /// </param>
  1046. ///
  1047. /// <returns>
  1048. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1049. /// </returns>
  1050. ///
  1051. Acad::ErrorStatus getLeaderLineIndexes(int leaderIndex, AcArray<int>& leaderLineIndexes) const;
  1052. /// <summary>
  1053. /// Sets the dog-leg in the leader cluster specified by leaderIndex with vector.
  1054. /// </summary>
  1055. ///
  1056. /// <param name="leaderIndex">
  1057. /// Input leader index.
  1058. /// </param>
  1059. /// <param name="vector">
  1060. /// Input the vector represents the new length and new direction of dog-leg.
  1061. /// </param>
  1062. ///
  1063. /// <returns>
  1064. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1065. /// </returns>
  1066. ///
  1067. Acad::ErrorStatus setDoglegDirection (int leaderIndex, const AcGeVector3d& vector);
  1068. /// <summary>
  1069. /// Gets the vector represents the length and direction of the dog-leg in specified leader cluster.
  1070. /// </summary>
  1071. ///
  1072. /// <param name="leaderIndex">
  1073. /// Input leader index.
  1074. /// </param>
  1075. /// <param name="vector">
  1076. /// Ouput the vector represents the length and direction of the dog-leg in specified leader cluster.
  1077. /// </param>
  1078. ///
  1079. /// <returns>
  1080. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1081. /// </returns>
  1082. ///
  1083. Acad::ErrorStatus getDoglegDirection (int leaderIndex, AcGeVector3d& vector) const;
  1084. /// <summary>
  1085. /// Sets the leader type to this mleader object.
  1086. /// </summary>
  1087. ///
  1088. /// <param name="leaderLineType">
  1089. /// Input the leader type. leaderLineType is defined in AcDbMLeaderStyle::LeaderType
  1090. /// </param>
  1091. ///
  1092. /// <returns>
  1093. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1094. /// </returns>
  1095. ///
  1096. /// <remarks>
  1097. /// This function will set PropertyOverrideType kLeaderLineType override.
  1098. /// </remarks>
  1099. ///
  1100. Acad::ErrorStatus setLeaderLineType (AcDbMLeaderStyle::LeaderType leaderLineType);
  1101. /// <summary>
  1102. /// Gets the leader line type of this mleader object.
  1103. /// </summary>
  1104. ///
  1105. /// <returns>
  1106. /// Returns the leader line type of this mleader object.
  1107. /// </returns>
  1108. ///
  1109. AcDbMLeaderStyle::LeaderType leaderLineType () const;
  1110. /// <summary>
  1111. /// Sets the leader line type for the specific leaderline.
  1112. /// </summary>
  1113. ///
  1114. /// <param name="leaderLineIndex">
  1115. /// Input the index of the specific leaderline.
  1116. /// </param>
  1117. /// <param name="arrowSymbolId">
  1118. /// Input the leader line type.
  1119. /// </param>
  1120. ///
  1121. /// <returns>
  1122. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1123. /// </returns>
  1124. ///
  1125. Acad::ErrorStatus setLeaderLineType(int leaderLineIndex,
  1126. AcDbMLeaderStyle::LeaderType leaderLineType);
  1127. /// <summary>
  1128. /// Gets the leader line type for the specific leaderline.
  1129. /// </summary>
  1130. ///
  1131. /// <param name="leaderLineIndex">
  1132. /// Input the index of the specific leaderline.
  1133. /// </param>
  1134. /// <param name="arrowSymbolId">
  1135. /// Gets the leader line type of the specific leaderline.
  1136. /// </param>
  1137. ///
  1138. /// <returns>
  1139. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1140. /// </returns>
  1141. ///
  1142. Acad::ErrorStatus getLeaderLineType(int leaderLineIndex,
  1143. AcDbMLeaderStyle::LeaderType& leaderLineType) const;
  1144. /// <summary>
  1145. /// Sets the color of leader lines.
  1146. /// </summary>
  1147. ///
  1148. /// <param name="leaderLineColor">
  1149. /// Input the color of leader lines.
  1150. /// </param>
  1151. ///
  1152. /// <returns>
  1153. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1154. /// </returns>
  1155. ///
  1156. /// <remarks>
  1157. /// This function will set PropertyOverrideType kLeaderLineColor override.
  1158. /// </remarks>
  1159. ///
  1160. Acad::ErrorStatus setLeaderLineColor (const AcCmColor& leaderLineColor);
  1161. /// <summary>
  1162. /// Gets the color of leader lines.
  1163. /// </summary>
  1164. ///
  1165. /// <returns>
  1166. /// Returns the color of leader lines.
  1167. /// </returns>
  1168. ///
  1169. AcCmColor leaderLineColor () const;
  1170. /// <summary>
  1171. /// Sets the color of leader lines for the specific leaderline.
  1172. /// </summary>
  1173. ///
  1174. /// <param name="leaderLineIndex">
  1175. /// Input the index of the specific leaderline.
  1176. /// </param>
  1177. /// <param name="arrowSymbolId">
  1178. /// Input the color of leader lines.
  1179. /// </param>
  1180. ///
  1181. /// <returns>
  1182. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1183. /// </returns>
  1184. ///
  1185. Acad::ErrorStatus setLeaderLineColor(int leaderLineIndex,
  1186. const AcCmColor& leaderLineColor);
  1187. /// <summary>
  1188. /// Gets the color of leader lines for the specific leaderline.
  1189. /// </summary>
  1190. ///
  1191. /// <param name="leaderLineIndex">
  1192. /// Input the index of the specific leaderline.
  1193. /// </param>
  1194. /// <param name="arrowSymbolId">
  1195. /// Gets the color of leader lines of the specific leaderline.
  1196. /// </param>
  1197. ///
  1198. /// <returns>
  1199. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1200. /// </returns>
  1201. ///
  1202. Acad::ErrorStatus getLeaderLineColor(int leaderLineIndex,
  1203. AcCmColor& leaderLineColor) const;
  1204. /// <summary>
  1205. /// Sets the objectId of leader line type.
  1206. /// </summary>
  1207. ///
  1208. /// <param name="leaderLineTypeId">
  1209. /// Input the objectId of leader line type.
  1210. /// </param>
  1211. ///
  1212. /// <returns>
  1213. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1214. /// </returns>
  1215. ///
  1216. /// <remarks>
  1217. /// This function will set PropertyOverrideType kLeaderLineTypeId override.
  1218. /// </remarks>
  1219. ///
  1220. Acad::ErrorStatus setLeaderLineTypeId (AcDbObjectId leaderLineTypeId);
  1221. /// <summary>
  1222. /// Gets the objectId of leader line type.
  1223. /// </summary>
  1224. ///
  1225. /// <returns>
  1226. /// Returns the objectId of leader line type.
  1227. /// </returns>
  1228. ///
  1229. AcDbObjectId leaderLineTypeId () const;
  1230. /// <summary>
  1231. /// Sets the objectId of leader line type for the specific leaderline.
  1232. /// </summary>
  1233. ///
  1234. /// <param name="leaderLineIndex">
  1235. /// Input the index of the specific leaderline.
  1236. /// </param>
  1237. /// <param name="arrowSymbolId">
  1238. /// Input the objectId of leader line type.
  1239. /// </param>
  1240. ///
  1241. /// <returns>
  1242. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1243. /// </returns>
  1244. ///
  1245. Acad::ErrorStatus setLeaderLineTypeId(int leaderLineIndex,
  1246. AcDbObjectId leaderLineTypeId);
  1247. /// <summary>
  1248. /// Gets the objectId of leader line type for the specific leaderline.
  1249. /// </summary>
  1250. ///
  1251. /// <param name="leaderLineIndex">
  1252. /// Input the index of the specific leaderline.
  1253. /// </param>
  1254. /// <param name="arrowSymbolId">
  1255. /// Gets the objectId of leader line type of the specific leaderline.
  1256. /// </param>
  1257. ///
  1258. /// <returns>
  1259. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1260. /// </returns>
  1261. ///
  1262. Acad::ErrorStatus getLeaderLineTypeId(int leaderLineIndex,
  1263. AcDbObjectId& leaderLineTypeId) const;
  1264. /// <summary>
  1265. /// Sets the line weight of leader lines.
  1266. /// </summary>
  1267. ///
  1268. /// <param name="leaderLineWeight">
  1269. /// Input the line weight of leader lines.
  1270. /// </param>
  1271. ///
  1272. /// <returns>
  1273. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1274. /// </returns>
  1275. ///
  1276. /// <remarks>
  1277. /// This function will set PropertyOverrideType kLeaderLineWeight override.
  1278. /// </remarks>
  1279. ///
  1280. Acad::ErrorStatus setLeaderLineWeight (AcDb::LineWeight leaderLineWeight);
  1281. /// <summary>
  1282. /// Gets the line weight of leader lines.
  1283. /// </summary>
  1284. ///
  1285. /// <returns>
  1286. /// Returns the line weight of leader lines.
  1287. /// </returns>
  1288. ///
  1289. AcDb::LineWeight leaderLineWeight () const;
  1290. /// <summary>
  1291. /// Sets the line weight for the specific leaderline.
  1292. /// </summary>
  1293. ///
  1294. /// <param name="leaderLineIndex">
  1295. /// Input the index of the specific leaderline.
  1296. /// </param>
  1297. /// <param name="arrowSymbolId">
  1298. /// Input the line weight.
  1299. /// </param>
  1300. ///
  1301. /// <returns>
  1302. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1303. /// </returns>
  1304. ///
  1305. Acad::ErrorStatus setLeaderLineWeight(int leaderLineIndex,
  1306. AcDb::LineWeight leaderLineWeight);
  1307. /// <summary>
  1308. /// Gets the line weight for the specific leaderline.
  1309. /// </summary>
  1310. ///
  1311. /// <param name="leaderLineIndex">
  1312. /// Input the index of the specific leaderline.
  1313. /// </param>
  1314. /// <param name="arrowSymbolId">
  1315. /// Gets the line weight of the specific leaderline.
  1316. /// </param>
  1317. ///
  1318. /// <returns>
  1319. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1320. /// </returns>
  1321. ///
  1322. Acad::ErrorStatus getLeaderLineWeight(int leaderLineIndex,
  1323. AcDb::LineWeight& leaderLineWeight) const;
  1324. /// <summary>
  1325. /// Sets the gap between leader tail and MText.
  1326. /// </summary>
  1327. ///
  1328. /// <param name="landingGap">
  1329. /// Input the gap between leader tail and MText.
  1330. /// </param>
  1331. ///
  1332. /// <returns>
  1333. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1334. /// </returns>
  1335. ///
  1336. /// <remarks>
  1337. /// This function will set PropertyOverrideType kLandingGap override.
  1338. /// </remarks>
  1339. ///
  1340. Acad::ErrorStatus setLandingGap (double landingGap);
  1341. /// <summary>
  1342. /// Gets the gap between leader tail and MText.
  1343. /// </summary>
  1344. ///
  1345. /// <returns>
  1346. /// Returns the gap between leader tail and MText.
  1347. /// </returns>
  1348. ///
  1349. double landingGap () const;
  1350. /// <summary>
  1351. /// Used to enable/disable landing of leader line.
  1352. /// </summary>
  1353. ///
  1354. /// <param name="enableLanding">
  1355. /// Input boolean to enable/disable landing of leader line.
  1356. /// </param>
  1357. ///
  1358. /// <returns>
  1359. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1360. /// </returns>
  1361. ///
  1362. /// <remarks>
  1363. /// This function will set PropertyOverrideType kEnableLanding override.
  1364. /// If disable landing, the landing gap will be ignored.
  1365. /// </remarks>
  1366. ///
  1367. Acad::ErrorStatus setEnableLanding (bool enableLanding);
  1368. /// <summary>
  1369. /// Indicates whether landing of leader line is enabled.
  1370. /// </summary>
  1371. ///
  1372. /// <returns>
  1373. /// If landing of leader line is enabled, returns true; otherwise, returns false.
  1374. /// </returns>
  1375. ///
  1376. bool enableLanding () const;
  1377. /// <summary>
  1378. /// Used to enable/disable dog-leg leader line.
  1379. /// </summary>
  1380. ///
  1381. /// <param name="enableDogleg">
  1382. /// Input boolean to enable/disable dog-leg leader line.
  1383. /// </param>
  1384. ///
  1385. /// <returns>
  1386. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1387. /// </returns>
  1388. ///
  1389. /// <remarks>
  1390. /// This function will set PropertyOverrideType kEnableDogleg override.
  1391. /// </remarks>
  1392. ///
  1393. Acad::ErrorStatus setEnableDogleg (bool enableDogleg);
  1394. /// <summary>
  1395. /// Indicates whether dog-leg leader line is enabled.
  1396. /// </summary>
  1397. ///
  1398. /// <returns>
  1399. /// If dog-leg leader line is enabled, returns true; otherwise, returns false.
  1400. /// </returns>
  1401. ///
  1402. bool enableDogleg () const;
  1403. /// <summary>
  1404. /// Set the length of doglegs in the leader cluster specified by leaderIndex.
  1405. /// </summary>
  1406. ///
  1407. /// <param name="leaderIndex">
  1408. /// Input leader index.
  1409. /// </param>
  1410. /// <param name="doglegLength">
  1411. /// Input the length of doglegs.
  1412. /// </param>
  1413. ///
  1414. /// <returns>
  1415. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1416. /// </returns>
  1417. ///
  1418. /// <remarks>
  1419. /// This function will set PropertyOverrideType kDoglegLength override.
  1420. /// </remarks>
  1421. ///
  1422. Acad::ErrorStatus setDoglegLength (int leaderIndex, double doglegLength);
  1423. /// <summary>
  1424. /// Gets the length of doglegs in the leader cluster specified by leaderIndex.
  1425. /// </summary>
  1426. ///
  1427. /// <param name="leaderIndex">
  1428. /// Input leader index.
  1429. /// </param>
  1430. /// <param name="doglegLength">
  1431. /// Output leader index.
  1432. /// </param>
  1433. ///
  1434. /// <returns>
  1435. /// Returns the length of doglegs.
  1436. /// </returns>
  1437. ///
  1438. Acad::ErrorStatus doglegLength (int leaderIndex, double& doglegLength) const;
  1439. /// <remarks>
  1440. /// Deprecated: This method will be removed in a future release.
  1441. /// Instead, use the method:
  1442. /// <code>
  1443. /// Acad::ErrorStatus setDoglegLength(int leaderIndex, double doglegLength);
  1444. /// </code>
  1445. /// </remarks>
  1446. Acad::ErrorStatus setDoglegLength (double doglegLength);
  1447. /// <remarks>
  1448. /// Deprecated: This method will be removed in a future release.
  1449. /// Instead, use the method:
  1450. /// <code>
  1451. /// Acad::ErrorStatus doglegLength(int leaderIndex, double&amp; doglegLength) const;
  1452. /// </code>
  1453. /// </remarks>
  1454. double doglegLength () const;
  1455. /// <summary>
  1456. /// Sets default arrow symbol id.
  1457. /// </summary>
  1458. ///
  1459. /// <param name="arrowSymbolId">
  1460. /// Input the objectId of arrow symbol.
  1461. /// </param>
  1462. ///
  1463. /// <returns>
  1464. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1465. /// </returns>
  1466. ///
  1467. /// <remarks>
  1468. /// This function will set PropertyOverrideType kArrowSymbolId override.
  1469. /// If doesn't set arrow symbol id for specific leaderline,
  1470. /// the leaderline will use this default arrowSymbolId.
  1471. /// </remarks>
  1472. ///
  1473. Acad::ErrorStatus setArrowSymbolId (AcDbObjectId arrowSymbolId);
  1474. /// <summary>
  1475. /// Gets the default arrow symbol id
  1476. /// </summary>
  1477. ///
  1478. /// <returns>
  1479. /// Returns the default arrow symbol id
  1480. /// </returns>
  1481. ///
  1482. AcDbObjectId arrowSymbolId () const;
  1483. /// <summary>
  1484. /// Sets the arrow head symbol id for the specific leaderline.
  1485. /// </summary>
  1486. ///
  1487. /// <param name="leaderLineIndex">
  1488. /// Input the index of the specific leaderline.
  1489. /// </param>
  1490. /// <param name="arrowSymbolId">
  1491. /// Input the object id of the arrow head symbol.
  1492. /// </param>
  1493. ///
  1494. /// <returns>
  1495. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1496. /// </returns>
  1497. ///
  1498. Acad::ErrorStatus setArrowSymbolId(int leaderLineIndex,
  1499. AcDbObjectId arrowSymbolId);
  1500. /// <summary>
  1501. /// Gets the arrow head symbol id for the specific leaderline.
  1502. /// </summary>
  1503. ///
  1504. /// <param name="leaderLineIndex">
  1505. /// Input the index of the specific leaderline.
  1506. /// </param>
  1507. /// <param name="arrowSymbolId">
  1508. /// Gets the object id of the arrow head symbol of the specific leaderline.
  1509. /// </param>
  1510. ///
  1511. /// <returns>
  1512. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1513. /// </returns>
  1514. ///
  1515. Acad::ErrorStatus getArrowSymbolId(int leaderLineIndex,
  1516. AcDbObjectId& arrowSymbolId) const;
  1517. /// <remarks>
  1518. /// Deprecated: This method will be removed in a future release.
  1519. /// Instead, use the method:
  1520. /// <code>
  1521. /// Acad::ErrorStatus getArrowSymbolId(int leaderLineIndex; AcDbObjectId&amp arrowSymbolId) const;
  1522. /// </code>
  1523. /// </remarks>
  1524. AcDbObjectId arrowSymbolId(int leaderLineIndex) const;
  1525. /// <summary>
  1526. /// Sets arrow size of this mleader object.
  1527. /// </summary>
  1528. ///
  1529. /// <param name="arrowSize">
  1530. /// Input size of arrow.
  1531. /// </param>
  1532. ///
  1533. /// <returns>
  1534. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1535. /// </returns>
  1536. ///
  1537. /// <remarks>
  1538. /// This function will set PropertyOverrideType kArrowSize override.
  1539. /// </remarks>
  1540. ///
  1541. Acad::ErrorStatus setArrowSize (double arrowSize);
  1542. /// <summary>
  1543. /// Gets the arrow size of this mleader object.
  1544. /// </summary>
  1545. ///
  1546. /// <returns>
  1547. /// Returns the arrow size of this mleader object.
  1548. /// </returns>
  1549. ///
  1550. double arrowSize () const;
  1551. /// <summary>
  1552. /// Sets the arrow size for the specific leaderline.
  1553. /// </summary>
  1554. ///
  1555. /// <param name="leaderLineIndex">
  1556. /// Input the index of the specific leaderline.
  1557. /// </param>
  1558. /// <param name="arrowSymbolId">
  1559. /// Input the arrow size.
  1560. /// </param>
  1561. ///
  1562. /// <returns>
  1563. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1564. /// </returns>
  1565. ///
  1566. Acad::ErrorStatus setArrowSize(int leaderLineIndex, double arrowSize);
  1567. /// <summary>
  1568. /// Gets the arrow size for the specific leaderline.
  1569. /// </summary>
  1570. ///
  1571. /// <param name="leaderLineIndex">
  1572. /// Input the index of the specific leaderline.
  1573. /// </param>
  1574. /// <param name="arrowSymbolId">
  1575. /// Gets the arrow size of the specific leaderline.
  1576. /// </param>
  1577. ///
  1578. /// <returns>
  1579. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1580. /// </returns>
  1581. ///
  1582. Acad::ErrorStatus getArrowSize(int leaderLineIndex, double& arrowSize) const;
  1583. /// <summary>
  1584. /// Sets the content type of this mleader object.
  1585. /// </summary>
  1586. ///
  1587. /// <param name="contentType">
  1588. /// Input text content type. The content type is defined in AcDbMLeaderStyle::ContentType.
  1589. /// </param>
  1590. ///
  1591. /// <returns>
  1592. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1593. /// </returns>
  1594. ///
  1595. /// <remarks>
  1596. /// This function will set PropertyOverrideType kContentType override.
  1597. /// </remarks>
  1598. ///
  1599. Acad::ErrorStatus setContentType (AcDbMLeaderStyle::ContentType contentType);
  1600. /// <summary>
  1601. /// Gets the content type of this mleader object.
  1602. /// </summary>
  1603. ///
  1604. /// <returns>
  1605. /// Returns the content type of this mleader object.
  1606. /// </returns>
  1607. ///
  1608. AcDbMLeaderStyle::ContentType contentType () const;
  1609. /// <summary>
  1610. /// Sets the MText content in mleader content to use the textStyle specified by textStyleId.
  1611. /// </summary>
  1612. ///
  1613. /// <param name="textStyleId">
  1614. /// Input AcDbTextStyle objectId.
  1615. /// </param>
  1616. ///
  1617. /// <returns>
  1618. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1619. /// </returns>
  1620. ///
  1621. /// <remarks>
  1622. /// This function will set PropertyOverrideType kTextStyleId override.
  1623. /// </remarks>
  1624. ///
  1625. Acad::ErrorStatus setTextStyleId (AcDbObjectId textStyleId);
  1626. /// <summary>
  1627. /// Gets MText content textStyle objectId.
  1628. /// </summary>
  1629. ///
  1630. /// <returns>
  1631. /// Returns MText content textStyle objectId.
  1632. /// </returns>
  1633. ///
  1634. AcDbObjectId textStyleId () const;
  1635. /// <summary>
  1636. /// Sets text attachment type of MText content to specific direction leader.
  1637. /// </summary>
  1638. ///
  1639. /// <param name="textAttachmentType">
  1640. /// Input text attachment type defined in AcDbMLeaderStyle::TextAttachmentType.
  1641. /// </param>
  1642. /// <param name="leaderDirection">
  1643. /// Input text leader direction type defined in AcDbMLeaderStyle::LeaderDirectionType.
  1644. /// </param>
  1645. ///
  1646. /// <returns>
  1647. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1648. /// </returns>
  1649. ///
  1650. /// <remarks>
  1651. /// This function will set PropertyOverrideType kTextLeft/RightAttachmentType override.
  1652. /// </remarks>
  1653. ///
  1654. Acad::ErrorStatus setTextAttachmentType (AcDbMLeaderStyle::TextAttachmentType textAttachmentType,
  1655. AcDbMLeaderStyle::LeaderDirectionType leaderDirection);
  1656. /// <summary>
  1657. /// Gets text attachment type of MText content from specific direction leader.
  1658. /// </summary>
  1659. ///
  1660. /// <param name="leaderDirection">
  1661. /// Input text leader direction type defined in AcDbMLeaderStyle::LeaderDirectionType.
  1662. /// </param>
  1663. ///
  1664. /// <returns>
  1665. /// Returns text attachment type of MText content.
  1666. /// </returns>
  1667. ///
  1668. AcDbMLeaderStyle::TextAttachmentType textAttachmentType (AcDbMLeaderStyle::LeaderDirectionType leaderDirection) const;
  1669. /// <remarks>
  1670. /// Deprecated: This method will be removed in a future release.
  1671. /// Instead, use the method:
  1672. /// <code>
  1673. /// Acad::ErrorStatus setTextAttachmentType(AcDbMLeaderStyle::TextAttachmentType textAttachmentType,
  1674. /// AcDbMLeaderStyle::LeaderDirectionType leaderDirection);
  1675. /// </code>
  1676. /// </remarks>
  1677. Acad::ErrorStatus setTextAttachmentType (AcDbMLeaderStyle::TextAttachmentType textAttachmentType);
  1678. /// <remarks>
  1679. /// Deprecated: This method will be removed in a future release.
  1680. /// Instead, use the method:
  1681. /// <code>
  1682. /// AcDbMLeaderStyle::TextAttachmentType textAttachmentType(AcDbMLeaderStyle::LeaderDirectionType leaderDirection) const;
  1683. /// </code>
  1684. /// </remarks>
  1685. AcDbMLeaderStyle::TextAttachmentType textAttachmentType () const;
  1686. /// <summary>
  1687. /// Sets the angle type of MText content which respect to the last leader line segment.
  1688. /// </summary>
  1689. ///
  1690. /// <param name="textAngleType">
  1691. /// Input text textAngleType type defined in AcDbMLeaderStyle::TextAngleType.
  1692. /// </param>
  1693. ///
  1694. /// <returns>
  1695. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1696. /// </returns>
  1697. ///
  1698. /// <remarks>
  1699. /// This function will set PropertyOverrideType kTextAngleType override.
  1700. /// </remarks>
  1701. ///
  1702. Acad::ErrorStatus setTextAngleType (AcDbMLeaderStyle::TextAngleType textAngleType);
  1703. /// <summary>
  1704. /// Gets the angle type of MText content.
  1705. /// </summary>
  1706. ///
  1707. /// <returns>
  1708. /// Returns the angle type of MText content.
  1709. /// </returns>
  1710. ///
  1711. AcDbMLeaderStyle::TextAngleType textAngleType () const;
  1712. /// <summary>
  1713. /// Sets text alignment type of MText content.
  1714. /// </summary>
  1715. ///
  1716. /// <param name="textAlignmentType">
  1717. /// Input textAlignmentType defined in AcDbMLeaderStyle::TextAlignmentType.
  1718. /// </param>
  1719. ///
  1720. /// <returns>
  1721. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1722. /// </returns>
  1723. ///
  1724. /// <remarks>
  1725. /// This function will set PropertyOverrideType kTextAlignmentType override.
  1726. /// </remarks>
  1727. ///
  1728. Acad::ErrorStatus setTextAlignmentType (AcDbMLeaderStyle::TextAlignmentType textAlignmentType);
  1729. /// <summary>
  1730. /// Gets text alignment type of MText content.
  1731. /// </summary>
  1732. ///
  1733. /// <returns>
  1734. /// Returns text alignment type of MText content.
  1735. /// </returns>
  1736. ///
  1737. AcDbMLeaderStyle::TextAlignmentType textAlignmentType () const;
  1738. /// <summary>
  1739. /// Sets text color of MText content.
  1740. /// </summary>
  1741. ///
  1742. /// <param name="textColor">
  1743. /// Input text color.
  1744. /// </param>
  1745. ///
  1746. /// <returns>
  1747. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1748. /// </returns>
  1749. ///
  1750. /// <remarks>
  1751. /// This function will set PropertyOverrideType kTextColor override.
  1752. /// </remarks>
  1753. ///
  1754. Acad::ErrorStatus setTextColor (const AcCmColor& textColor);
  1755. /// <summary>
  1756. /// Gets text color of MText content.
  1757. /// </summary>
  1758. ///
  1759. /// <returns>
  1760. /// Returns text color of MText content.
  1761. /// </returns>
  1762. ///
  1763. AcCmColor textColor () const;
  1764. /// <summary>
  1765. /// Sets text height of MText content.
  1766. /// </summary>
  1767. ///
  1768. /// <param name="textHeight">
  1769. /// Input text height.
  1770. /// </param>
  1771. ///
  1772. /// <returns>
  1773. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1774. /// </returns>
  1775. ///
  1776. /// <remarks>
  1777. /// This function will set PropertyOverrideType kTextHeight override.
  1778. /// </remarks>
  1779. ///
  1780. Acad::ErrorStatus setTextHeight (double textHeight);
  1781. /// <summary>
  1782. /// Gets text height of MText content.
  1783. /// </summary>
  1784. ///
  1785. /// <returns>
  1786. /// Returns text height of MText content.
  1787. /// </returns>
  1788. ///
  1789. double textHeight () const;
  1790. /// <summary>
  1791. /// Sets the text frame visible or invisible.
  1792. /// </summary>
  1793. ///
  1794. /// <param name="enableFrameText">
  1795. /// Input boolean to make the frame text visible/invisible.
  1796. /// </param>
  1797. ///
  1798. /// <returns>
  1799. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1800. /// </returns>
  1801. ///
  1802. /// <remarks>
  1803. /// This function will set PropertyOverrideType kEnableFrameText override.
  1804. /// </remarks>
  1805. ///
  1806. Acad::ErrorStatus setEnableFrameText (bool enableFrameText);
  1807. /// <summary>
  1808. /// Indicates whether text frame of MText is visible.
  1809. /// </summary>
  1810. ///
  1811. /// <returns>
  1812. /// Returns true if text frame is visible; otherwise, returns false.
  1813. /// </returns>
  1814. ///
  1815. bool enableFrameText () const;
  1816. /// <summary>
  1817. /// Sets a MText object to mleader.
  1818. /// </summary>
  1819. ///
  1820. /// <param name="pMText">
  1821. /// Input the pointer of MText object.
  1822. /// If input NULL, mleader use the default mtext defined in mleaderStyle.
  1823. /// </param>
  1824. ///
  1825. /// <returns>
  1826. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1827. /// </returns>
  1828. ///
  1829. /// <remarks>
  1830. /// This function will set PropertyOverrideType kDefaultMText override.
  1831. /// Mleader will not change the input pMText,
  1832. /// and doesn't mind whether the pMText is database resident.
  1833. /// If input NULL, mleader use the default mtext defined in mleaderStyle,
  1834. /// and kDefaultMText will not be overrided.
  1835. /// </remarks>
  1836. ///
  1837. Acad::ErrorStatus setMText (const AcDbMText* pMText);
  1838. /// <summary>
  1839. /// Gets a copy of mleader's mtext content
  1840. /// </summary>
  1841. ///
  1842. /// <returns>
  1843. /// Returns the copy of mtext content. If there is no mtext content, it returns NULL.
  1844. /// </returns>
  1845. ///
  1846. /// <remarks>
  1847. /// The returned mtext should be delete when it is no longer needed.
  1848. /// </remarks>
  1849. ///
  1850. AcDbMText* mtext () const;
  1851. /// <summary>
  1852. /// Sets the id of referenced block, it's a block table record id.
  1853. /// </summary>
  1854. ///
  1855. /// <param name="blockId">
  1856. /// Input block table record Id.
  1857. /// </param>
  1858. ///
  1859. /// <returns>
  1860. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1861. /// </returns>
  1862. ///
  1863. /// <remarks>
  1864. /// This function will set PropertyOverrideType kBlockId override.
  1865. /// </remarks>
  1866. ///
  1867. Acad::ErrorStatus setBlockContentId (AcDbObjectId blockId);
  1868. /// <summary>
  1869. /// Gets the id of referenced block, it's a block table record id.
  1870. /// </summary>
  1871. ///
  1872. /// <returns>
  1873. /// Returns the id of referenced block, it's a block table record id.
  1874. /// </returns>
  1875. ///
  1876. AcDbObjectId blockContentId () const;
  1877. /// <summary>
  1878. /// Sets block color in block content.
  1879. /// </summary>
  1880. ///
  1881. /// <param name="blockColor">
  1882. /// Input block color.
  1883. /// </param>
  1884. ///
  1885. /// <returns>
  1886. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1887. /// </returns>
  1888. ///
  1889. /// <remarks>
  1890. /// This function will set PropertyOverrideType kBlockColor override.
  1891. /// </remarks>
  1892. ///
  1893. Acad::ErrorStatus setBlockColor (const AcCmColor& blockColor);
  1894. /// <summary>
  1895. /// Gets block color in block content.
  1896. /// </summary>
  1897. ///
  1898. /// <returns>
  1899. /// Returns block color in block content.
  1900. /// </returns>
  1901. ///
  1902. AcCmColor blockColor () const;
  1903. /// <summary>
  1904. /// Sets the scale of referenced block.
  1905. /// </summary>
  1906. ///
  1907. /// <param name="scale">
  1908. /// Input scale of referenced block.
  1909. /// </param>
  1910. ///
  1911. /// <returns>
  1912. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1913. /// </returns>
  1914. ///
  1915. /// <remarks>
  1916. /// This function will set PropertyOverrideType kBlockScale override.
  1917. /// </remarks>
  1918. ///
  1919. Acad::ErrorStatus setBlockScale (const AcGeScale3d& scale);
  1920. /// <summary>
  1921. /// Gets the scale of referenced block.
  1922. /// </summary>
  1923. ///
  1924. /// <returns>
  1925. /// Returns the sacle of referenced block.
  1926. /// </returns>
  1927. ///
  1928. AcGeScale3d blockScale () const;
  1929. /// <summary>
  1930. /// Sets the rotation of referenced block.
  1931. /// </summary>
  1932. ///
  1933. /// <param name="rotation">
  1934. /// Input rotation of referenced block.
  1935. /// </param>
  1936. ///
  1937. /// <returns>
  1938. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1939. /// </returns>
  1940. ///
  1941. /// <remarks>
  1942. /// This function will set PropertyOverrideType kBlockRotation override.
  1943. /// Currently AutoCAD and the ARX API libraries make no use of this method.
  1944. /// This method is deprecated and will be removed in a future version.
  1945. /// </remarks>
  1946. ///
  1947. Acad::ErrorStatus setBlockRotation (double rotation);
  1948. /// <summary>
  1949. /// Gets the rotation of referenced block.
  1950. /// </summary>
  1951. ///
  1952. /// <returns>
  1953. /// Returns the rotation of referenced block.
  1954. /// </returns>
  1955. ///
  1956. /// <remarks>
  1957. /// Currently AutoCAD and the ARX API libraries make no use of this method.
  1958. /// This method is deprecated and will be removed in a future version.
  1959. /// </remarks>
  1960. ///
  1961. double blockRotation () const;
  1962. /// <summary>
  1963. /// Sets the type of how the block is connected with leader lines.
  1964. /// </summary>
  1965. ///
  1966. /// <param name="blockConnectionType">
  1967. /// Input the connection type defined in AcDbMLeaderStyle::BlockConnectionType.
  1968. /// </param>
  1969. ///
  1970. /// <returns>
  1971. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1972. /// </returns>
  1973. ///
  1974. /// <remarks>
  1975. /// This function will set PropertyOverrideType kBlockConnectionType override.
  1976. /// </remarks>
  1977. ///
  1978. Acad::ErrorStatus setBlockConnectionType (AcDbMLeaderStyle::BlockConnectionType blockConnectionType);
  1979. /// <summary>
  1980. /// Gets the type of how the block is connected with leader lines.
  1981. /// </summary>
  1982. ///
  1983. /// <returns>
  1984. /// Returns the type of how the block is connected with leader lines.
  1985. /// </returns>
  1986. ///
  1987. AcDbMLeaderStyle::BlockConnectionType blockConnectionType () const;
  1988. /// <summary>
  1989. /// Use this function to make the annotation scale enable or disable.
  1990. /// </summary>
  1991. ///
  1992. /// <param name="enableAnnotationScale">
  1993. /// Input boolean to make the annotation scale enable/disable.
  1994. /// </param>
  1995. ///
  1996. /// <returns>
  1997. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  1998. /// </returns>
  1999. ///
  2000. Acad::ErrorStatus setEnableAnnotationScale(bool enableAnnotationScale);
  2001. /// <summary>
  2002. /// Indicates whether annotation scale is enable.
  2003. /// </summary>
  2004. ///
  2005. /// <returns>
  2006. /// Returns true if annotation scale is enable; otherwise, returns false.
  2007. /// </returns>
  2008. ///
  2009. bool enableAnnotationScale () const;
  2010. /// <summary>
  2011. /// Sets the style of this MLeader object.
  2012. /// </summary>
  2013. ///
  2014. /// <param name="newStyleId">
  2015. /// Input objectId of the new style.
  2016. /// </param>
  2017. ///
  2018. /// <returns>
  2019. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2020. /// </returns>
  2021. ///
  2022. Acad::ErrorStatus setMLeaderStyle (AcDbObjectId newStyleId);
  2023. /// <summary>
  2024. /// Gets the object ID of current mleader object style.
  2025. /// </summary>
  2026. ///
  2027. /// <returns>
  2028. /// Returns the object ID of current mleader object style.
  2029. /// </returns>
  2030. ///
  2031. AcDbObjectId MLeaderStyle ();
  2032. /// <summary>
  2033. /// Gets the current mleader's properties, include override properties.
  2034. /// </summary>
  2035. ///
  2036. /// <param name="mleaderStyle">
  2037. /// Input a reference of mleaderStyle, mleader object will set its properties to this object.
  2038. /// </param>
  2039. ///
  2040. /// <returns>
  2041. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2042. /// </returns>
  2043. ///
  2044. Acad::ErrorStatus getOverridedMLeaderStyle(AcDbMLeaderStyle& mleaderStyle);
  2045. /// <summary>
  2046. /// Sets the context data manager to mleader.
  2047. /// </summary>
  2048. ///
  2049. /// <param name="pContextDataManager">
  2050. /// Input the pointer of context data manager.
  2051. /// </param>
  2052. ///
  2053. /// <returns>
  2054. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2055. /// </returns>
  2056. ///
  2057. Acad::ErrorStatus setContextDataManager (void* pContextDataManager);
  2058. /// <summary>
  2059. /// Gets the context data manager in mleader.
  2060. /// </summary>
  2061. ///
  2062. /// <returns>
  2063. /// Returns the context data manager in mleader.
  2064. /// </returns>
  2065. ///
  2066. void* getContextDataManager () const;
  2067. /// <summary>
  2068. /// Sets the position of mleader block content.
  2069. /// </summary>
  2070. ///
  2071. /// <param name="position">
  2072. /// Input the position of mleader block content.
  2073. /// </param>
  2074. ///
  2075. /// <returns>
  2076. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2077. /// </returns>
  2078. ///
  2079. Acad::ErrorStatus setBlockPosition (const AcGePoint3d& position);
  2080. /// <summary>
  2081. /// Gets the position of mleader block content.
  2082. /// </summary>
  2083. ///
  2084. /// <param name="position">
  2085. /// OutPut the position of mleader block content.
  2086. /// </param>
  2087. ///
  2088. /// <returns>
  2089. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2090. /// </returns>
  2091. ///
  2092. Acad::ErrorStatus getBlockPosition (AcGePoint3d& position) const;
  2093. /// <summary>
  2094. /// Sets the location of mleader mtext content.
  2095. /// </summary>
  2096. ///
  2097. /// <param name="location">
  2098. /// Input the location of mleader mtext content.
  2099. /// </param>
  2100. ///
  2101. /// <returns>
  2102. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2103. /// </returns>
  2104. ///
  2105. Acad::ErrorStatus setTextLocation (const AcGePoint3d& location);
  2106. /// <summary>
  2107. /// Gets the location of mleader mtext content.
  2108. /// </summary>
  2109. ///
  2110. /// <param name="location">
  2111. /// OutPut the location of mleader mtext content.
  2112. /// </param>
  2113. ///
  2114. /// <returns>
  2115. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2116. /// </returns>
  2117. ///
  2118. Acad::ErrorStatus getTextLocation (AcGePoint3d& location) const;
  2119. /// <summary>
  2120. /// Sets the location of mleader tolerance content.
  2121. /// </summary>
  2122. ///
  2123. /// <param name="location">
  2124. /// Input the location of mleader tolerance content.
  2125. /// </param>
  2126. ///
  2127. /// <returns>
  2128. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2129. /// </returns>
  2130. ///
  2131. Acad::ErrorStatus setToleranceLocation (const AcGePoint3d& location);
  2132. /// <summary>
  2133. /// Gets the location of mleader tolerance content.
  2134. /// </summary>
  2135. ///
  2136. /// <param name="location">
  2137. /// OutPut the location of mleader tolerance content.
  2138. /// </param>
  2139. ///
  2140. /// <returns>
  2141. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2142. /// </returns>
  2143. ///
  2144. Acad::ErrorStatus getToleranceLocation (AcGePoint3d& location) const;
  2145. /// <summary>
  2146. /// Indicates whether mleader has content.
  2147. /// </summary>
  2148. ///
  2149. /// <returns>
  2150. /// Returns true if mleader has content; otherwise, returns false.
  2151. /// </returns>
  2152. ///
  2153. bool hasContent () const;
  2154. /// <summary>
  2155. /// Gets the leader connection point of the specific direction.
  2156. /// </summary>
  2157. ///
  2158. /// <param name="vect">
  2159. /// Input the specific direction.
  2160. /// </param>
  2161. /// <param name="point">
  2162. /// Output the connection point.
  2163. /// </param>
  2164. ///
  2165. /// <returns>
  2166. /// Returns the object id of the arrow head symbol of the specific leaderline.
  2167. /// </returns>
  2168. ///
  2169. Acad::ErrorStatus connectionPoint (const AcGeVector3d& vect,
  2170. AcGePoint3d& point) const;
  2171. /// <summary>
  2172. /// Gets the leader connection point of the specific direction.
  2173. /// </summary>
  2174. ///
  2175. /// <param name="vect">
  2176. /// Input the specific direction.
  2177. /// </param>
  2178. /// <param name="point">
  2179. /// Output the connection point.
  2180. /// </param>
  2181. /// <param name="textAttachmentDirection">
  2182. /// Specify if the leader attaches to the MText horizontally or vertically.
  2183. /// </param>
  2184. ///
  2185. /// <returns>
  2186. /// Returns the object id of the arrow head symbol of the specific leaderline.
  2187. /// </returns>
  2188. ///
  2189. Acad::ErrorStatus connectionPoint (const AcGeVector3d& vect,
  2190. AcGePoint3d& point,
  2191. AcDbMLeaderStyle::TextAttachmentDirection textAttachmentDirection) const;
  2192. /// <summary>
  2193. /// Recaculate the dim break point.
  2194. /// </summary>
  2195. ///
  2196. /// <returns>
  2197. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2198. /// </returns>
  2199. ///
  2200. Acad::ErrorStatus recomputeBreakPoints ();
  2201. /// <summary>
  2202. /// Adds current mleader object to the modal space of input database.
  2203. /// </summary>
  2204. ///
  2205. /// <param name="pDb">
  2206. /// Input database into which the current mleader object should be added.
  2207. /// </param>
  2208. ///
  2209. /// <returns>
  2210. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2211. /// </returns>
  2212. ///
  2213. Acad::ErrorStatus postMLeaderToDb (AcDbDatabase* pDb);
  2214. // support dim associativity
  2215. /// <summary>
  2216. /// Update leaderLine position if leaderLine is associate with geometries
  2217. /// </summary>
  2218. ///
  2219. /// <returns>
  2220. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2221. /// </returns>
  2222. ///
  2223. Acad::ErrorStatus updateLeaderLinePosition();
  2224. /// <summary>
  2225. /// Remove the input leaderline's association with geometries.
  2226. /// </summary>
  2227. ///
  2228. /// <param name="leaderLineIndex">
  2229. /// Input leaderline index.
  2230. /// </param>
  2231. ///
  2232. /// <returns>
  2233. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2234. /// </returns>
  2235. ///
  2236. Acad::ErrorStatus removeLeaderLineRefAssoc(int leaderLineIndex) const;
  2237. /// <summary>
  2238. /// Update the mleader context's arrowhead, landing gap, dogleg length and textHeight or blockScale.
  2239. /// </summary>
  2240. ///
  2241. /// <param name="pContext">
  2242. /// Input pointer to mleader context data.
  2243. /// </param>
  2244. ///
  2245. /// <returns>
  2246. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2247. /// </returns>
  2248. ///
  2249. Acad::ErrorStatus updateContentScale(AcDbMLeaderObjectContextData* pContext);
  2250. /// <summary>
  2251. /// Sets text attachment Direction of MText content.
  2252. /// </summary>
  2253. ///
  2254. /// <param name="textAttachmentDirection">
  2255. /// Input text attachment direction defined in AcDbMLeaderStyle::TextAttachmentDirection.
  2256. /// </param>
  2257. ///
  2258. /// <returns>
  2259. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2260. /// </returns>
  2261. ///
  2262. Acad::ErrorStatus setTextAttachmentDirection(AcDbMLeaderStyle::TextAttachmentDirection textAttachmentDirection);
  2263. /// <summary>
  2264. /// Gets text attachment direction of MText content.
  2265. /// </summary>
  2266. ///
  2267. /// <returns>
  2268. /// Returns text attachment direction of MText content.
  2269. /// </returns>
  2270. ///
  2271. AcDbMLeaderStyle::TextAttachmentDirection textAttachmentDirection() const;
  2272. /// <summary>
  2273. /// Sets if horizontal leader lines are automatically extended to text.
  2274. /// </summary>
  2275. ///
  2276. /// <param name="value">
  2277. /// Input boolean to make the automatically leader extension on/off.
  2278. /// </param>
  2279. ///
  2280. /// <returns>
  2281. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2282. /// </returns>
  2283. ///
  2284. Acad::ErrorStatus setExtendLeaderToText(bool value);
  2285. /// <summary>
  2286. /// Gets if horizontal leader lines are automatically extended to text.
  2287. /// </summary>
  2288. ///
  2289. /// <returns>
  2290. /// Returns true if horizontal leader lines are automatically extended to text; otherwise, returns false.
  2291. /// </returns>
  2292. ///
  2293. bool extendLeaderToText() const;
  2294. protected:
  2295. /// <summary>
  2296. /// Gets corresponding COM wrapper class ID.
  2297. /// </summary>
  2298. ///
  2299. /// <param name="pClsid">
  2300. /// OutPut corresponding COM wrapper class ID.
  2301. /// </param>
  2302. ///
  2303. /// <returns>
  2304. /// Returns Acad::eOk if successful.Return values for errors are implementation-dependent.
  2305. /// </returns>
  2306. ///
  2307. virtual Acad::ErrorStatus subGetClassID (CLSID* pClsid) const;
  2308. };
  2309. #endif // __DBMLEADER_H__