Rotating Building Content objects with angles read from excel

Hi GC Guru's,

I have a challenge which I'm wanting to take to the next level,

Currently I've placed Building Content model into the model (AECOsim catalogue items created using a parametric cell by including the paradef definition and pointing it to my cell library)

To place the coordinates I've used an excel range and Building Content cell positioned accordingly - here positioning all cells by type at the excel coordinate positions (varied Building Content cells positioned by creating new sheets in the same excel file - here a master excel file can be used with ranges read to different sheets)

Here's my dilemma, I'm able to apply a rotation angle to all cells, which rotates all cells to the same direction but what I'm looking to do is apply the rotation angle read from an excel cell (along side the coordinates) and applied to only the building content relative to the point read from excel - so in simple speak, I'd like the position and rotation of each model placed read from excel

Also - the angles once applied should ideally be able to be corrected in GC if different to the original, and be written back to excel

Is it possible to create a 'List' or 'Table' of positions and rotations in GC that can be used to manipulate the model without having to correct and rerun the transactions (I've tried rolling up all transactions into one but this does not save much time)

look forward to your replies

Cheers

  • Hi Simon,

    Not sure whether I am following: when placing BuildingContent, it requires a CoordinateSystem as input. That input property is replicatable. When using a CoordinateSystem.ByUniversalTransform node, it can be replicated so that the x, y, z, and rotation values are read from an Excel spreadsheet and fed into the respective input properties, e.g. XTranslation, YTranslation, ZTranslation, and ZRotation. If you want to layer additional rotation values on top of the ones read from the spreadsheet, then it would be possible to do that by making a list containing the differential rotational values and adding that list to the list of rotation values read from Excel. That expression could be written into another Excel spreadsheet.

    This is shown in the attached AECOsim Building Designer CONNECT Edition Update 4 script. Instead of reading from an Excel spreadsheet, this script generates arbitrary X, Y, Z, and ZRotation values for the initial placement of the coordinate systems which are used to place the BuildingContent node instances. (Note that this is based on a neutral metric dataset; therefore, when using this script in some other dataset, the BuildingContent node may need to be redirected to some other content.) It contains two versions of layering another rotation on top of the read one: first by inserting an additional coordinate system using the ByUniversalTransform technique and adding a list of rotations to that coordinate system (relying on replication), or by directly adding the list of additional rotations onto the rotation of the placement coordinate system.

    cellrotation.dgn

    HTH,

          Volker

       

  • Hi Volker - your example works well (but yes, only once I loaded update 4:)) - I will try and manipulate this to what I need as it's somewhat similar, I'll get back to you when successful - thank you for you quick response