Hi All,
Another function question.
We are looking to find the corner angles of an array of facade panels.
Looking through the function list it appears easy enough to find the corner angle of a (planar) polygon using the Angle() function.
But this is just for a single polygon.
we would like to place some blinds on each panel related to the corner angle of each polygon, which does change on every panel.
So as a solution I created an output to excel and then ran a script transaction to achieve the result we were looking for in generating an angle for each panel.
for those interested i this is the script transaction
transaction 12 script 'Export to excel'{ string cellname = "A"; double cellnumber = 1; for (int i = 0; i < watch1.Count; ++i) { excelRange1.Value = Angle(watch1[i].Vertices[3],watch1[i].Vertices[2],watch1[i].Vertices[0]); cellnumber = 1 + i; cellname = "A" + cellnumber; excelRange1.RangeAddress = cellname; UpdateGraph(); }}
To make it simple for this test i flattened the polygon1 array using a watch and then as you can see above referenced this as the index for each polygon.
This works well and gives a list of angles for the given corner of each polygon.
We can then take this back in from excel to use as a rotation for our bind box.
My question is:
Is there a way to achieve this without the use of excel?
I tried to develop an expression to gather the angles into a list but I kept running into errors. (mostly my own knowledge)
Any suggestions would be appreciated.
Attached is a sample DGN/script
Thanks
Wayne
Measure_Panel_Angles.dgn