Hello is it possible to hide the model, then find all the components related to a parent part (e.g. model-1-/3, model-1-/3/3, etc.) and then highlight them?
thank you
Solved! Go to Solution.
That is fine. Seems that there are different approaches . here for example the selection using the code with custom search function - as one possible option:
attached the project , for the case that you want to look on it
Hi @GianVal ,
so far I know , it is not easy but possible. So , it is easy if you have a list of all child elements of a component so you can simple hide these items with sequence of calls as mentioned in the post https://community.ptc.com/t5/Vuforia-Studio/Hide-model-and-isolate-model-item/m-p/797796#M10875
So what I think, is more difficult is how to create a list of such elements. you can find some consideration in this post. Possibly they could be helpful https://community.ptc.com/t5/Vuforia-Studio-and-Chalk-Tech/How-to-extract-model-data-of-3d-models-in-Vuforia-Studio-without/ta-p/611149
(Status of the post above is old and does not consider the Metadata API)
I think that what we do in https://community.ptc.com/t5/Vuforia-Studio/Hide-model-and-isolate-model-item/m-p/797796#M10875 - could be easy modified so that we can simple check /select all ID paths which contains /starts with the path of the component for which you need to have the children. Please, let me know if this helps - otherwise I could modify the project accordingly . Thanks
as mentioned in my previous post - checked the functionality /sample project from https://community.ptc.com/t5/Vuforia-Studio/Hide-model-and-isolate-model-item/m-p/797796#M10875 and added a new functionality based on the custom search
So from a list of sub assembly paths (select-1) - when it is selected - then it will hide all components of the assembly and then will search for the components which contains in their idpath the subassembly id path and make them visible. I attached the new version of the project and hope that it helps.
Hello, let me share the solution I found for my use case:
var selected = metadata.getSelected()
for (var i = 0; i < selected.length; i++) {
if (selected[i].startsWith(item)) {
show3DObject('model-1-' + selected[i]);
} else {
hide3DObject('model-1-' + selected[i]);
}
where "item" is the component part id path
That is fine. Seems that there are different approaches . here for example the selection using the code with custom search function - as one possible option:
attached the project , for the case that you want to look on it