Category Creo Parametric TOOLKIT fundamentals, Object ProArray

Function ProArrayObjectAdd


Description
Adds an object at a specified location to the array, or appends an object to the end of an array.

For example, if you want to insert one integer in an integer array, call the function as follows:

 ProArrayObjectAdd (&int_array, 0, 1, (void *)&int_val);

If you want to insert 3 doubles at the second position in an array of doubles, call the function as follows:

 ProArrayObjectAdd (&dbl_array, 2, 3, (void *)dbl3_arr);

NOTE:

Because this call may cause the array to be reallocated, you must pass the address of the array.

Synopsis
#include <ProArray.h>
ProErrorProArrayObjectAdd(
ProArray* p_array
/* (In)
The address of the array.
*/
int index
/* (In)
The position at which to insert the objects in the array. If you specify a value less than 0 (PRO_VALUE_UNUSED), the function appends the objects to the end of the array.
*/
int n_objects
/* (In)
The number of objects to add to the array.
*/
void* p_object
/* (In)
The address from which a contiguous set of object data is to be copied into the array.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully added the objects to the array.
PRO_TK_BAD_INPUTSOne or more of the arguments are invalid.
PRO_TK_OUT_OF_MEMORYThe array would be too big to allocate.

Manual References:

  1. Fundamentals: Expandable Arrays
  2. Fundamentals: Expandable Arrays

Sample Code References:

  1. pt_af_examples ( PTMfgTemplateBOM.c )
  2. pt_autoaxis ( AutoAxis.c )
  3. pt_autoaxis ( AutoAxis.c )
  4. pt_autoaxis ( AutoAxis.c )
  5. pt_autoaxis ( AutoAxis.c )
  6. pt_autoaxis ( AutoAxis.c )
  7. pt_autoaxis ( AutoAxis.c )
  8. pt_examples ( TestAnalysisCompCurve.c )
  9. pt_examples ( TestAnalysisCompCurve.c )
  10. pt_examples ( TestAnalysisCompCurve.c )
  11. pt_examples ( TestAnalysisCompCurve.c )
  12. pt_examples ( TestAnalysisCsys.c )
  13. pt_examples ( TestAnalysisCsys.c )
  14. pt_examples ( TestAnalysisCsys.c )
  15. pt_examples ( TestAnalysisCsys.c )
  16. pt_examples ( TestAnalysisCsys.c )
  17. pt_examples ( TestAnalysisCsys.c )
  18. pt_examples ( TestAnalysisCurve.c )
  19. pt_examples ( TestAnalysisCurve.c )
  20. pt_examples ( TestAnalysisCurve.c )
  21. pt_examples ( TestAnalysisCurve.c )
  22. pt_examples ( TestAnalysisCurve.c )
  23. pt_examples ( TestAnalysisSrfCurve.c )
  24. pt_examples ( TestAnalysisSrfCurve.c )
  25. pt_examples ( TestAnalysisSrfCurve.c )
  26. pt_examples ( TestAnalysisSrfCurve.c )
  27. pt_examples ( TestAnalysisSrfCurve.c )
  28. pt_examples ( TestAnalysisSrfCurve.c )
  29. pt_examples ( TestAnalysisSrfCurve.c )
  30. pt_examples ( TestAnalysisSurface.c )
  31. pt_examples ( TestAnalysisSurface.c )
  32. pt_examples ( TestAnalysisSurface.c )
  33. pt_examples ( TestAnalysisSurface.c )
  34. pt_examples ( TestAnalysisSurface.c )
  35. pt_examples ( TestAnimation.c )
  36. pt_examples ( TestDrag.c )
  37. pt_examples ( TestMultiCADFile.c )
  38. pt_examples ( TestProcstep.c )
  39. pt_examples ( TestProcstep.c )
  40. pt_examples ( TestProcstep.c )
  41. pt_examples ( TestProcstep.c )
  42. pt_examples ( TestProcstep.c )
  43. pt_examples ( TestProcstep.c )
  44. pt_examples ( TestProcstep.c )
  45. pt_examples ( TestDbms.c )
  46. pt_examples ( TestDbms.c )
  47. pt_examples ( TestDbms.c )
  48. pt_examples ( TestDbms.c )
  49. pt_examples ( TestDbms.c )
  50. pt_examples ( TestDbms.c )
  51. pt_examples ( TestDimension.c )
  52. pt_examples ( TestDimension.c )
  53. pt_examples ( TestDimension.c )
  54. pt_examples ( TestGeomdata.c )
  55. pt_examples ( TestGeomdata.c )
  56. pt_examples ( TestDispObject.c )
  57. pt_examples ( TestDispObject.c )
  58. pt_examples ( TestDispObject.c )
  59. pt_examples ( TestDispObject.c )
  60. pt_examples ( TestDispObject.c )
  61. pt_examples ( TestDispObject.c )
  62. pt_examples ( TestDispObject.c )
  63. pt_examples ( TestDispObject.c )
  64. pt_examples ( TestDispObject.c )
  65. pt_examples ( TestExtobj.c )
  66. pt_examples ( TestExtobj.c )
  67. pt_examples ( TestExtobj.c )
  68. pt_examples ( TestFeats.c )
  69. pt_examples ( TestFeats.c )
  70. pt_examples ( TestFeats.c )
  71. pt_examples ( SketchFeatureCreate.c )
  72. pt_examples ( TestDtmPln.c )
  73. pt_examples ( TestExport.c )
  74. pt_examples ( TestExport.c )
  75. pt_examples ( UtilGeom.c )
  76. pt_examples ( TestDtlentity.c )
  77. pt_examples ( TestDtlentity.c )
  78. pt_examples ( TestDtlentity.c )
  79. pt_examples ( TestDtlentity.c )
  80. pt_examples ( TestDtlgroup.c )
  81. pt_examples ( TestDtlnote.c )
  82. pt_examples ( TestDtlnote.c )
  83. pt_examples ( TestDtlnote.c )
  84. pt_examples ( TestDtlsyminst.c )
  85. pt_examples ( TestGraphics.c )
  86. pt_examples ( TestGraphics.c )
  87. pt_examples ( TestGraphics.c )
  88. pt_examples ( TestLayer.c )
  89. pt_examples ( TestCavityLayout.c )
  90. pt_examples ( TestCavityLayout.c )
  91. pt_examples ( TestCavityLayout.c )
  92. pt_examples ( TestClCmd.c )
  93. pt_examples ( TestClCmd.c )
  94. pt_examples ( TestClCmd.c )
  95. pt_examples ( TestMfgMenu.c )
  96. pt_examples ( TestMfgMenu.c )
  97. pt_examples ( TestMfgMenu.c )
  98. pt_examples ( TestMfgMenu.c )
  99. pt_examples ( TestMfgMenu.c )
  100. pt_examples ( TestGtol.c )
  101. pt_examples ( TestRelation.c )
  102. pt_examples ( TestRelation.c )
  103. pt_examples ( TestSetup.c )
  104. pt_examples ( UtilSect.c )
  105. pt_examples ( UtilSect.c )
  106. pt_examples ( UtilSect.c )
  107. pt_examples ( UtilSect.c )
  108. pt_examples ( UtilSect.c )
  109. pt_examples ( UtilSect.c )
  110. pt_examples ( UtilSect.c )
  111. pt_examples ( UtilSect.c )
  112. pt_examples ( UtilSect.c )
  113. pt_examples ( UtilSect.c )
  114. pt_examples ( UtilSect.c )
  115. pt_examples ( UtilSect.c )
  116. pt_examples ( UtilSect.c )
  117. pt_examples ( UtilSect.c )
  118. pt_examples ( UtilSect.c )
  119. pt_examples ( TestRule.c )
  120. pt_examples ( TestError.c )
  121. pt_examples ( UtilCable.c )
  122. pt_examples ( UtilCable.c )
  123. pt_examples ( UtilCable.c )
  124. pt_examples ( UtilCable.c )
  125. pt_examples ( UtilCable.c )
  126. pt_examples ( UtilCollect.c )
  127. pt_examples ( UtilCollect.c )
  128. pt_examples ( UtilCollectDtmpnt.c )
  129. pt_examples ( UtilCollectDtmpnt.c )
  130. pt_examples ( UtilMenu.c )
  131. pt_examples ( UtilMenu.c )
  132. pt_examples ( UtilMenu.c )
  133. pt_examples ( UtilMenu.c )
  134. pt_geardesign ( GearDesign.c )
  135. pt_geardesign ( GearDesign.c )
  136. pt_geardesign ( GearDesign.c )
  137. pt_geardesign ( GearDesign.c )
  138. pt_geardesign ( GearDesignUtils.c )
  139. pt_userguide ( UgAsmcompConstraint.c )
  140. pt_userguide ( UgAsmcompConstraint.c )
  141. pt_userguide ( UgDrawingDimensions.c )
  142. pt_userguide ( UgDwgtableExamples.c )
  143. pt_userguide ( UgNoteCreate.c )
  144. pt_userguide ( UgExtAnalysisSurfcsys.c )
  145. pt_userguide ( UgExtAnalysisSurfcsys.c )
  146. pt_userguide ( UgExtAnalysisSurfcsys.c )
  147. pt_userguide ( UgExtAnalysisSurfcsys.c )
  148. pt_userguide ( Ug3DSectSplineDim.c )
  149. pt_userguide ( Ug3DSectSplineDim.c )
  150. pt_userguide ( Ug3DSectSplineDim.c )
  151. pt_userguide ( Ug3DSectSplineDim.c )
  152. pt_userguide ( UgCreoSweepCreate.c )
  153. pt_userguide ( UgFlexModelCreate.c )
  154. pt_userguide ( UgFlexModelCreate.c )
  155. pt_userguide ( UgFlexModelCreate.c )
  156. pt_userguide ( UgImportfeatCreate.c )
  157. pt_userguide ( UgFundExpArrays.c )
  158. pt_userguide ( UgGtolCreate.c )
  159. pt_userguide ( UgModelCheck.c )
  160. pt_userguide ( UgMfgMillSeqCreate.c )
  161. pt_userguide ( UgMfgWcellIdentify.c )
  162. pt_userguide ( UgFileEdit.c )
  163. pt_userguide ( UgFileEdit.c )
  164. pt_userguide ( UgFileEdit.c )
  165. pt_userguide ( UgFileEdit.c )
  166. pt_wc_server ( PTWCServerFileUtils.c )