Popup warning to stop users rotating project north

Popup warning to stop users rotating project north

FrankHolidaytoiling
Advocate Advocate
503 Views
4 Replies
Message 1 of 5

Popup warning to stop users rotating project north

FrankHolidaytoiling
Advocate
Advocate

We have a great deal of issues with naive Revit users rotating the project north. However it still occurs and like with cad imports I want to pop upo a warning in revit project models to warn of the dire consequences. 

I use the iupdater interface for cad imports and i wanted to detect elementids that have been changed, then show a custom form or message box warning to rotate true north as the correct method and that all existing model elements will be rotated and walls end up off-axis.

My questions are should i use iupdater for this and if so how can i find the type or category of object that is the project north? Is this the most efficient method.

Finally if not should i be using an alternate method like on doc changed event and compare the project north rotation before and after? I dont even know how to get the project north as a value or parameter, the true north has a built-in-parameter. Do I just check that the project north is not a vector pointning up?

   

 

0 Likes
Accepted solutions (1)
504 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Well, divide and conquer, to start with. Find out how to retrieve the project north and compare it with your desired value. Once you have that, there are many ways to warn users. If you have some of your own add-in code that is executed regularly in daily work, you could just add a call to your project north checking routine to the other code. That would obliviate all need to bother with updaters and other complicated stuff.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 5

FrankHolidaytoiling
Advocate
Advocate

thanx jeremmy, 

I really just needed to check the journal for the post command id...

here it is if others find this post.

 

RevitCommandId commandId = RevitCommandId.LookupCommandId("ID_ROTATE_PROJECT");
try
{
AddInCommandBinding rotateProjectBinding = UIControlledApp.CreateAddInCommandBinding(commandId);
rotateProjectBinding.Executed += new EventHandler<Autodesk.Revit.UI.Events.ExecutedEventArgs>(RotateWarning);
}
catch
{ }

 

Message 4 of 5

RPTHOMAS108
Mentor
Mentor
Accepted solution

It is also a postable command so you could have also used:

 

RevitCommandId.LookupPostableCommandId(PostableCommand.RotateProjectNorth)

 

In the early stages of a project (before you have lots of sections etc.) I don't see the issue with rotating project north. I think in terms of fitting things on sheets it is far superior to setting orientation via scope boxes. There is obviously a stage of development within the project file where deciding to rotate project north is not a good idea.

 

I always notice when I write 'postable' that it isn't a word apparently, it is a combination of letters underlined with a red squiggle. Not sure there is a word describing the ability to post something? However people must have this issue all the time with large parcels i.e. 'is it postable?' no the letter box is too small.

Yes

Postable - definition of Postable by The Free Dictionary

No

Collins Online Dictionary | Definitions, Thesaurus and Translations (collinsdictionary.com)

 

 

Message 5 of 5

FrankHolidaytoiling
Advocate
Advocate

words like symbolic and viewer do not seem to hone in on a meaning to me and yes we have have many views, models predocumented that only get slightly updated and these need to have scope boxes if we rotate the project north. The users that do the rotation we suspect get confused by 1. cad files rotating so try anything other than link in a true north view and 2. which one do i rotate project nth or true.