cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Navigating views and showing a few different popups

CZ_9729748
7-Bedrock

Navigating views and showing a few different popups

Hi, I'm wondering if it is possible to change/navigate to a different view within the same project where after navigating to a different view, a few popups will be shown. I saw that there is already some post related to the issue I am having, however after viewing the older posts I am still unable to get the solution. Any help would be much appreciated!

5 REPLIES 5

Try the below, it will launch/switch to the view "demo_view1". You can define your popup in the new view:

$scope.$emit('app-fn-navigate', {'viewname': 'demo_view1'});

Hi, my apologies but what I'm trying to do is to change view and show the popup both at the same time by a same button. Just double checking will that code work? As I noticed that it doesn't ask require a popup number.

@CZ_9729748 

If you want to change the view from view1 to view 2 and invoke the popup when switch to view2, you can:

 

1> Navigate to view 2 in the view 1's JS:

      $scope.$emit('app-fn-navigate', {'viewname': 'view2'});

 

2> In the view 2's JS, you can use the below code to invoke the popup-1 automatically after model is loaded:

////

     $rootScope.$on('modelLoaded', function() {
         // invoke popup-1
       $scope.app.fn.triggerWidgetService('popup-1','showpopup');
} )

////

Hi, I have tried using the code but can't seem to get it to work. It navigated to the view I wanted but it didn't show the popup when it navigate. Is there any other approach to doing this?

Hi, @CZ_9729748 

 

You can do it with or without any code.

 

Without:

In FROM view, create a Button which Click Event Binds to TO view (navigate).

 

In TO view, create a empty 3D Model and a Popup.

Binds 3D Model Model Loaded Event to Popup Show Popup.

 

With code, please check the attachment for details.

In fact, not to much different. Same Events are used to trigger corresponding JS.

 

 

Announcements

Top Tags