Skip to content

Commit

Permalink
added code in CmdUnrotateNorth to determine angle to north from proje…
Browse files Browse the repository at this point in the history
…ct base point
  • Loading branch information
Jeremy Tammik committed Aug 20, 2014
1 parent 7339e48 commit b9199e5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
21 changes: 21 additions & 0 deletions BuildingCoder/BuildingCoder/CmdUnrotateNorth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ public Result Execute(
UIDocument uidoc = app.ActiveUIDocument;
Document doc = uidoc.Document;

#region Determine true north rotation

Element projectInfoElement
= new FilteredElementCollector(doc)
.OfCategory(BuiltInCategory.OST_ProjectBasePoint)
.FirstElement();

BuiltInParameter bipAtn
= BuiltInParameter.BASEPOINT_ANGLETON_PARAM;

Parameter patn = projectInfoElement.get_Parameter(
bipAtn );

double atn = patn.AsDouble();

Debug.Print(
"Angle to north from project info: {0}",
Util.AngleString( atn ) );

#endregion // Determine true north rotation

ElementSet els = uidoc.Selection.Elements;

if( 1 != els.Size )
Expand Down
5 changes: 3 additions & 2 deletions BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
// 2014-05-14 2015.0.110.0 CmdViewsShowingElements
// 2014-07-21 2015.0.110.1 AddFaceBasedFamilyToLinks
// 2014-08-19 2015.0.110.2 removed obsolete API usage: reduced warning count from 71 to 67
// 2014-08-20 2015.0.110.3 added code in CmdUnrotateNorth to determine angle to north from project base point
//
[assembly: AssemblyVersion( "2015.0.110.2" )]
[assembly: AssemblyFileVersion( "2015.0.110.2" )]
[assembly: AssemblyVersion( "2015.0.110.3" )]
[assembly: AssemblyFileVersion( "2015.0.110.3" )]

0 comments on commit b9199e5

Please sign in to comment.