<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AC24 how to change rectangle columns section width and height? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305729#M1736</link>
    <description>&lt;P&gt;I can create a rectangle column, but don't know how to change section width and height, AC24:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void Do_CreateColumn (void)
{
  API_Coord point;

  if (!ClickAPoint ("Pick a point", &amp;amp;point)) {
    return;
  }

  API_Element element;
  API_ElementMemo memo;
  BNClear (element);
  BNClear (memo);

  element.header.typeID = API_ColumnID; // set as a column
  GSErrCode err = ACAPI_Element_GetDefaults (&amp;amp;element, &amp;amp;memo); //get current setting

  if (err != NoError) {
    ACAPI_WriteReport ("ACAPI_Element_GetDefaults (Column) has failed with error code %ld!", true, err);
    ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
    return;
  }

  element.column.origoPos = point;
  element.column.bottomOffset = -0.05;
  element.column.topOffset = -0.05;
  element.column.axisRotationAngle = 45; //rotate
  memo.elemInfoString = new GS::UniString("KZ-1"); //uset ID

  err = ACAPI_Element_Create (&amp;amp;element, &amp;amp;memo); //create the column
  if (err != NoError) {
    ACAPI_WriteReport ("ACAPI_Element_Create (Column) has failed with error code %ld!", true, err);
  }

  char buffer[65];
  sprintf(buffer, "%s%d", "Column Segment:", element.column.nSegments); //1 segment in fact

  MessageBox(NULL, buffer, "Grand", 0); //display how many segments 
  //modify section width and height     ACAPI_CallUndoableCommand 进程中-----------------------------

  ????how to change the section width and height of this column ???

  ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
} // Do_CreateColumn&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 06:25:22 GMT</pubDate>
    <dc:creator>Boling1</dc:creator>
    <dc:date>2021-09-14T06:25:22Z</dc:date>
    <item>
      <title>AC24 how to change rectangle columns section width and height?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305729#M1736</link>
      <description>&lt;P&gt;I can create a rectangle column, but don't know how to change section width and height, AC24:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void Do_CreateColumn (void)
{
  API_Coord point;

  if (!ClickAPoint ("Pick a point", &amp;amp;point)) {
    return;
  }

  API_Element element;
  API_ElementMemo memo;
  BNClear (element);
  BNClear (memo);

  element.header.typeID = API_ColumnID; // set as a column
  GSErrCode err = ACAPI_Element_GetDefaults (&amp;amp;element, &amp;amp;memo); //get current setting

  if (err != NoError) {
    ACAPI_WriteReport ("ACAPI_Element_GetDefaults (Column) has failed with error code %ld!", true, err);
    ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
    return;
  }

  element.column.origoPos = point;
  element.column.bottomOffset = -0.05;
  element.column.topOffset = -0.05;
  element.column.axisRotationAngle = 45; //rotate
  memo.elemInfoString = new GS::UniString("KZ-1"); //uset ID

  err = ACAPI_Element_Create (&amp;amp;element, &amp;amp;memo); //create the column
  if (err != NoError) {
    ACAPI_WriteReport ("ACAPI_Element_Create (Column) has failed with error code %ld!", true, err);
  }

  char buffer[65];
  sprintf(buffer, "%s%d", "Column Segment:", element.column.nSegments); //1 segment in fact

  MessageBox(NULL, buffer, "Grand", 0); //display how many segments 
  //modify section width and height     ACAPI_CallUndoableCommand 进程中-----------------------------

  ????how to change the section width and height of this column ???

  ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
} // Do_CreateColumn&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:25:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305729#M1736</guid>
      <dc:creator>Boling1</dc:creator>
      <dc:date>2021-09-14T06:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: AC24 how to change rectangle columns section width and height?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305815#M1737</link>
      <description>&lt;P&gt;I had to go back and look at my notes and still didn't figure it out. I don't know how the define a segment column and a column without segments.&lt;/P&gt;&lt;P&gt;But you can use a single segment column by using the memo fields and set nsegments as 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;then use:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;element.header.typeID = API_ColumnID;
	GSErrCode err = ACAPI_Element_GetDefaults (&amp;amp;element, &amp;amp;memo);

element.column.origoPos = point;
	element.column.nSegments = 1;
	memo.columnSegments[0].assemblySegmentData.buildingMaterial = ??;
	memo.columnSegments[0].assemblySegmentData.nominalHeight = ??;
	memo.columnSegments[0].assemblySegmentData.nominalWidth = ??;
	memo.columnSegments[0].assemblySegmentData.modelElemStructureType = API_BasicStructure; or ???&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more nsegments change the index of columnsegment in memo&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 04:58:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305815#M1737</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2021-09-13T04:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: AC24 how to change rectangle columns section width and height?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305843#M1738</link>
      <description>&lt;P&gt;thank you very much,it works fine!&lt;/P&gt;&lt;P&gt;Great!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 09:43:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/AC24-how-to-change-rectangle-columns-section-width-and-height/m-p/305843#M1738</guid>
      <dc:creator>Boling1</dc:creator>
      <dc:date>2021-09-13T09:43:04Z</dc:date>
    </item>
  </channel>
</rss>

