We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

API: How to create Rectangle Column?

Yeojin
Contributor

Hi Everyone. 

I practice to create Add-On that create rectangle columns but its doesn't work to control core width / height and structure. 

 

I already try this post solution but it's not working to me. 

https://community.Graphisoft.com/t5/Developer-forum/AC24-how-to-change-rectangle-columns-section-wid... 

 

I'd like to write a column that modified the parameters I marked. 

pic1.pngpic2.png

 

 

How can I modify the code? 

 

 

 

column.column.origoPos.x = data.begX;		
column.column.origoPos.y = data.begY;		

column.column.relativeTopStory = 0;

column.columnSegment.assemblySegmentData.circleBased = 0;	//rectangular(=false)
column.columnSegment.assemblySegmentData.isWidthAndHeightLinked = 0; // false
column.columnSegment.assemblySegmentData.nominalWidth = data.height;	//Nominal width of segment.
column.columnSegment.assemblySegmentData.nominalHeight = data.level;	//Normal height of segment.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Yeojin,

There a few details wrong in the code you provided. Here's an example on how I would fix it:

columnElement.column.origoPos.x = data.begX;		
columnElement.column.origoPos.y = data.begY;		

columnElement.column.bottomOffset = 2; // this is the column base level in meters relative to it's floor

columnMemo.columnSegments[0].assemblySegmentData.circleBased = 0;	//rectangular(=false)
columnMemo.columnSegments[0].assemblySegmentData.isWidthAndHeightLinked = 0; // false
columnMemo.columnSegments[0].assemblySegmentData.nominalWidth = data.height;	//Nominal width of segment.
columnMemo.columnSegments[0].assemblySegmentData.nominalHeight = data.level;	//Normal height of segment.

 It's important to differentiate between the element and the element memo! Also you have to specify the width/weight for a specific column Segment. In the code above i used columnSegments[0]. You would have to adjust the code if the column has more than one segment.

`columnElement.column.bottomOffset` corresponds to the lower marks in your first picture.

Hope that helps,
Bernd

View solution in original post

2 REPLIES 2
Solution

Hi Yeojin,

There a few details wrong in the code you provided. Here's an example on how I would fix it:

columnElement.column.origoPos.x = data.begX;		
columnElement.column.origoPos.y = data.begY;		

columnElement.column.bottomOffset = 2; // this is the column base level in meters relative to it's floor

columnMemo.columnSegments[0].assemblySegmentData.circleBased = 0;	//rectangular(=false)
columnMemo.columnSegments[0].assemblySegmentData.isWidthAndHeightLinked = 0; // false
columnMemo.columnSegments[0].assemblySegmentData.nominalWidth = data.height;	//Nominal width of segment.
columnMemo.columnSegments[0].assemblySegmentData.nominalHeight = data.level;	//Normal height of segment.

 It's important to differentiate between the element and the element memo! Also you have to specify the width/weight for a specific column Segment. In the code above i used columnSegments[0]. You would have to adjust the code if the column has more than one segment.

`columnElement.column.bottomOffset` corresponds to the lower marks in your first picture.

Hope that helps,
Bernd

Hi Bernd

Thank you so much! 😄 it works!