2022-10-04 10:42 AM - last edited on 2022-10-06 05:23 AM by Karl Ottenstein
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.
I'd like to write a column that modified the parameters I marked.
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.
Solved! Go to Solution.
2022-10-05 02:32 PM
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
2022-10-05 02:32 PM
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
2022-10-06 02:10 AM
Hi Bernd
Thank you so much! 😄 it works!