Why methods enumNodeFragments undefined?How set transparenty of element in autodesk-viewer?Detecting an undefined object propertyHow to check empty/undefined/null string in JavaScript?Why is using “for…in” with array iteration a bad idea?What is JSONP, and why was it created?How to determine if variable is 'undefined' or 'null'?Why does Google prepend while(1); to their JSON responses?How to check for “undefined” in JavaScript?Is there a standard function to check for null, undefined, or blank variables in JavaScript?Why does ++[[]][+[]]+[+[]] return the string “10”?What is TypeScript and why would I use it in place of JavaScript?
Movie where a boy is transported into the future by an alien spaceship
What happened to all the nuclear material being smuggled after the fall of the USSR?
Metal bar on DMM PCB
Is it possible for people to live in the eye of a permanent hypercane?
How are colors really mixed?
Does the growth of home value benefit from compound interest?
What are they doing to this poor rocket?
Combining mathcal and mathbb with thin lines
How to make thick Asian sauces?
What is a simple, physical situation where complex numbers emerge naturally?
Is it OK to bring delicacies from hometown as tokens of gratitude for an out-of-town interview?
Old black and white movie: glowing black rocks slowly turn you into stone upon touch
You've spoiled/damaged the card
Is it a problem that pull requests are approved without any comments
Bent spoke design wheels — feasible?
What are the words for people who cause trouble believing they know better?
How to connect an offset point symbol to its original position in QGIS?
Traffic law UK, pedestrians
Does resistor placement change power dissipation in simple LED circuit?
Riley's, assemble!
Anatomically Correct Swarm of Rodents
If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?
How certain is a caster of when their spell will end?
Can a magnetic field of an object be stronger than its gravity?
Why methods enumNodeFragments undefined?
How set transparenty of element in autodesk-viewer?Detecting an undefined object propertyHow to check empty/undefined/null string in JavaScript?Why is using “for…in” with array iteration a bad idea?What is JSONP, and why was it created?How to determine if variable is 'undefined' or 'null'?Why does Google prepend while(1); to their JSON responses?How to check for “undefined” in JavaScript?Is there a standard function to check for null, undefined, or blank variables in JavaScript?Why does ++[[]][+[]]+[+[]] return the string “10”?What is TypeScript and why would I use it in place of JavaScript?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am working on a project in which we load two models. Loaded two models opened in the same viewer. At the moment I am looking for a way to establish transparency or hide elements.
For some reason, the hide and isolate methods work on one model, although I am passing the dbId elements of the two models.
I was advised to use the enumNodeFragments method, but in my case it is always undefined, it simply does not exist. I've tried a lot of options, so that this method has appeared, but it was all in vain.
I would like to ask for advice on how I can find this method.
By the way, let me say that for me the most important thing is to find a way to hide the elements of the two models.
javascript autodesk-forge
add a comment |
I am working on a project in which we load two models. Loaded two models opened in the same viewer. At the moment I am looking for a way to establish transparency or hide elements.
For some reason, the hide and isolate methods work on one model, although I am passing the dbId elements of the two models.
I was advised to use the enumNodeFragments method, but in my case it is always undefined, it simply does not exist. I've tried a lot of options, so that this method has appeared, but it was all in vain.
I would like to ask for advice on how I can find this method.
By the way, let me say that for me the most important thing is to find a way to hide the elements of the two models.
javascript autodesk-forge
add a comment |
I am working on a project in which we load two models. Loaded two models opened in the same viewer. At the moment I am looking for a way to establish transparency or hide elements.
For some reason, the hide and isolate methods work on one model, although I am passing the dbId elements of the two models.
I was advised to use the enumNodeFragments method, but in my case it is always undefined, it simply does not exist. I've tried a lot of options, so that this method has appeared, but it was all in vain.
I would like to ask for advice on how I can find this method.
By the way, let me say that for me the most important thing is to find a way to hide the elements of the two models.
javascript autodesk-forge
I am working on a project in which we load two models. Loaded two models opened in the same viewer. At the moment I am looking for a way to establish transparency or hide elements.
For some reason, the hide and isolate methods work on one model, although I am passing the dbId elements of the two models.
I was advised to use the enumNodeFragments method, but in my case it is always undefined, it simply does not exist. I've tried a lot of options, so that this method has appeared, but it was all in vain.
I would like to ask for advice on how I can find this method.
By the way, let me say that for me the most important thing is to find a way to hide the elements of the two models.
javascript autodesk-forge
javascript autodesk-forge
asked Mar 24 at 13:13
Alisa BondarchukAlisa Bondarchuk
536
536
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Like we discussed in the other thread this method is only available after the geometry data of the model is loaded - Viewer needs to tell whether the model is suitable for node fragment enumeration before it exposes the method:
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,()=> viewer.model.getData().instanceTree.enumNodeFragments(dbid, fragId => console.log(fragId)))
See live code here.
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
Did you pass in the correct dbid? My live code runs because4is a valid dbid for the model I am using...
– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324167%2fwhy-methods-enumnodefragments-undefined%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Like we discussed in the other thread this method is only available after the geometry data of the model is loaded - Viewer needs to tell whether the model is suitable for node fragment enumeration before it exposes the method:
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,()=> viewer.model.getData().instanceTree.enumNodeFragments(dbid, fragId => console.log(fragId)))
See live code here.
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
Did you pass in the correct dbid? My live code runs because4is a valid dbid for the model I am using...
– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
|
show 1 more comment
Like we discussed in the other thread this method is only available after the geometry data of the model is loaded - Viewer needs to tell whether the model is suitable for node fragment enumeration before it exposes the method:
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,()=> viewer.model.getData().instanceTree.enumNodeFragments(dbid, fragId => console.log(fragId)))
See live code here.
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
Did you pass in the correct dbid? My live code runs because4is a valid dbid for the model I am using...
– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
|
show 1 more comment
Like we discussed in the other thread this method is only available after the geometry data of the model is loaded - Viewer needs to tell whether the model is suitable for node fragment enumeration before it exposes the method:
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,()=> viewer.model.getData().instanceTree.enumNodeFragments(dbid, fragId => console.log(fragId)))
See live code here.
Like we discussed in the other thread this method is only available after the geometry data of the model is loaded - Viewer needs to tell whether the model is suitable for node fragment enumeration before it exposes the method:
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT,()=> viewer.model.getData().instanceTree.enumNodeFragments(dbid, fragId => console.log(fragId)))
See live code here.
edited Mar 26 at 2:58
answered Mar 25 at 2:30
Bryan HuangBryan Huang
1,8251912
1,8251912
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
Did you pass in the correct dbid? My live code runs because4is a valid dbid for the model I am using...
– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
|
show 1 more comment
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
Did you pass in the correct dbid? My live code runs because4is a valid dbid for the model I am using...
– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
Thank you very much. Sorry, but I still get undefined. Here is my code that I use.
– Alisa Bondarchuk
Mar 25 at 5:22
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
I also tried to get in the console enumNodeFragments using the code you suggested, but I just do not get anything.
– Alisa Bondarchuk
Mar 25 at 5:33
1
1
Did you pass in the correct dbid? My live code runs because
4 is a valid dbid for the model I am using...– Bryan Huang
Mar 26 at 2:59
Did you pass in the correct dbid? My live code runs because
4 is a valid dbid for the model I am using...– Bryan Huang
Mar 26 at 2:59
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Sorry, it was my mistake, your code is working. I don’t know why, but I can’t convert my code so that it works. I added your code to my project and it worked. It turned out that you use viewer.start (), and I use a completely different code to load several models. I need to convert my code so that it works as it should. I will be glad to advice, thank you very much.
– Alisa Bondarchuk
Mar 26 at 5:37
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
Hello Bryan Huang. I continued to look for a solution for this problem and came to the following result. When I bring my svfUrl the value that you passed to options.document in your code, you get everything you need, but if I instead use the following code as I get undefined. The problem is in this code, but how can I change it? doc.getViewablePath (initialViewable)
– Alisa Bondarchuk
Mar 28 at 7:24
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324167%2fwhy-methods-enumnodefragments-undefined%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown