Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extension InViewerSearch

1 REPLY 1
Reply
Message 1 of 2
claraarias
428 Views, 1 Reply

Extension InViewerSearch

               We want to add our viewer extension: Autodesk.InViewerSearch

 

I have done the steps indicated in the link:

 

https://developer.autodesk.com/en/docs/viewer/v2/tutorials/in-viewer-search-ext/

 

The declaration of the variable config3d:

 

 

var config3d = {

    extensions: ['MyBotonesExtension', 'Autodesk.InViewerSearch']

}

 

config3d.inViewerSearchConfig = {

            searchDefaultText: "",

            uiEnabled: true,

            clientId: 'adsk.viewer.defaultClientId',

            sessionId: 'adsk.viewer.defaultSessionId',

            

        relatedItemsTab:{

            enabled: true,  //if false we hide the tab

            displayName: 'This Item',

            pageSize: 20

        },

        loadedModelTab: {

            enabled: true,  //if false we hide the tab

            displayName: 'This View',

            pageSize: 50

        }

   

};

 

viewerApp.registerViewer(viewerApp.k3D, Autodesk.Viewing.Private.GuiViewer3D, config3d);

 

 

 

In my index.html:

 

    <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/three.min.js"></script>

    <script src="scripts/Extension-InViewerSearch.js"></script>

    <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js?v=2.11.*"></script>

 

 

Extension-InViewerSearch.js->

 

https://autodeskviewer.com/viewers-dev/latest/docs/extensions_InviewerSearch_InViewerSearchExtension...

 

 

 

 

ERROR:

 

ypeError: n[m] is undefined

 

 

i.initSharedPropertyDatabase()    viewer3D.min.js:38

i.initCurrentPropertyDatabase()   viewer3D.min.js:38

i.getCurrentGeometryAttributes()  viewer3D.min.js:38

f/h.initializeAllAttributes()     viewer3D.min.js:38

j.InViewerSearchThisView.prototype.initialize()  viewer3D.min.js:38

a() viewer3D.min.js:36

h/p() viewer3D.min.js:36

f/<()

 

 

I change viewer3d.min.js by viewer3d.js

 

ERROR IN viewer3D.js:

 

ypeError: geometriesFlat[current] is undefined

 

 

proto.initSharedPropertyDatabase() viewer3D.js:89706

proto.initCurrentPropertyDatabase() viewer3D.js:89724

proto.getCurrentGeometryAttributes() viewer3D.js:89778

Controller/ctrl.initializeAllAttributes() viewer3D.js:88945

viewerSearchNameSpace.InViewerSearchThisView.prototype.initialize() viewer3D.js:88260

initializeSearchTabs() viewer3D.js:85412

initialize/onGetGeometriesDone() viewer3D.js:85603

getGeometries/<()

 

 

 

I made another extension running development differently, when the geometry is loaded and ... the result has been the same ... same error:

 

 

viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,

                    function (event) {

 

                       

                        var options = {

                            searchDefaultText: "",

                            uiEnabled: true,

                            clientId: 'adsk.viewer.defaultClientId',

                            sessionId: 'adsk.viewer.defaultSessionId',

                            thresholdSearchMaxNodes: 50000,

 

                            loadedModelTab: {

                                enabled: true,

                                displayName: 'This View',

                                pageSize: 50

                            },

 

                            relatedItemsTab: {

                                enabled: true,

                                displayName: 'This Item',

                                pageSize: 20

                            }

                        };

                        viewer.loadExtension("Autodesk.InViewerSearch", options);……..

 

 In the display only shows the magnifying glass icon.

 

I hope to hear from somebody soon...

<br class="Apple-interchange-newline"><div id="inner-editor"></div>
 
 
Thank you so much

 

1 REPLY 1
Message 2 of 2
ekinsb
in reply to: claraarias

This forum is for questions about Fusion 360. For Forge questions they're using Stackoverflow and the Forge experts are watching there for questions.  Can you please re-post your question on Stackoverflow?


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report