Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Forge Viewer in PowerBi load and unload a model.

I am currently using a tutorial I found to put the Forge Viewer into PowerBi. And in this the URN is hard coded into the script. What i want to do next, now that i have the viewer working in PowerBi, is be able to load and unload a model based on the list of models that i have.

 

Currently in PowerBi i have a list of my model that i have along with their URN's. I want to be able to click on this list that is in PowerBi and update my Forge Viewer. So far what I've added is code to unload a model, now i just need to find a way to load another model dynamically. This is what i have for unloading a model that i have add to the visual.ts file.

 

 

 

 

 

         this.forge_viewer.unloadDocumentNode = function (manifestNode){
         //if model is in memory, just unload it.

         let model = this.impl.findModel(manifestNode, true);
         if (model){
             this.impl.unloadModel(model);
             return true;
         }
     }

 

 

 

 

 Can someone guide me in the right direction or show me how to load a model in the way i decscribed above? if that isnt possible would there be another way?

 

Thank you in advance.

3 REPLIES 3
gmmanfredi
Regular Visitor

Hi!

I'm sorry to use your topic, but it is hard to find people working on the same project.

I am following the same tutorial: Did you manage to complete it?

and i am having troubles in creating building the visual.

did you use 

npm i -g powerbi-visuals-tools@2.5.0 ?

 what version of

npm i d3 , npm i @types/d3npm i core-js and npm i powerbi-visuals-api did you use?

The microsoft tutorial https://docs.microsoft.com/it-it/power-bi/developer/visuals/environment-setup?tabs=windows makes yo install specific version but i think i have to install others, i just can't get which. 

And last, what is your version of node.js?

 

https://stackoverflow.com/questions/69103885/pbiviz-start-error-less-style-visual-less this is the error i get trying to run pbiviz start

Thank you if you can help me

GMM

J_MOLS
Frequent Visitor

Hello,

 

I'm sorry I dont have any answer to your problem.

 

But I am currently following the same tutorial and I'm having trouble at one step for the Excel-forge properties.

 

Can I contact you to ask you a question to help me with the process ?

 

Thank in advance

J Mols

Anonymous
Not applicable

Hey, I too could not get this to work on myside, my plan is it use the datamanagement and model derivative api to get the information that pertain to the revit files.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.