View Sheet Activated Event

View Sheet Activated Event

josh.roth.MEI
Enthusiast Enthusiast
1,055 Views
2 Replies
Message 1 of 3

View Sheet Activated Event

josh.roth.MEI
Enthusiast
Enthusiast

Hi All,

 

I currently have a script in my custom application that uses the ViewActivated Event to change the workset of workshared models (we are an MEP firm and have separate worksets for enlarged plans). I am noticing, however, that opening/switching to a sheet does not trigger the ViewActivated Event, and I am wondering if there is another event that I should be using instead.

 

Thanks in advance!

0 Likes
Accepted solutions (2)
1,056 Views
2 Replies
Replies (2)
Message 2 of 3

Sean_Page
Collaborator
Collaborator
Accepted solution

The ViewActivated event handler does fire when changing to a ViewSheet view. What elements on a sheet are you trying to changed since most items will either be viewports or schedules on a sheet. It may help if you could share more about what you are wanting to do.

Sean Page, AIA, NCARB, LEED AP
Partner, Computational Designer, Architect
0 Likes
Message 3 of 3

josh.roth.MEI
Enthusiast
Enthusiast
Accepted solution

@Sean_Page thanks for the heads up! I put my code in a separate command, used add-in manager to debug, and found a null reference exception. I wasn't aware that event based scripts wouldn't throw an error if there is one - good to know!