cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

API: How to create Rectangle Column?

Yeojin
Participant

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

Solution
bschwb
Advocate

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

Bernd Schwarzenbacher
Archicad Add-On Developer
Get (partially free) Add-Ons at www.bschwb.com/add-ons

View solution in original post

2 REPLIES 2

Solution
bschwb
Advocate

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

Bernd Schwarzenbacher
Archicad Add-On Developer
Get (partially free) Add-Ons at www.bschwb.com/add-ons

Hi Bernd

Thank you so much! 😄 it works!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!