Skip to main content
9-Granite
October 31, 2023
Solved

Re: Hide and show parts

  • October 31, 2023
  • 1 reply
  • 1553 views

As per the original post

 

HI, i have the same problem here.

if i use ProSolidFeatVisit() function to visit the assembly, how do i transfer between feature and modelitem? which value of ProSolidFeatVisit() function should be used? and do you mind share your code here, many thanks.

Best answer by RPN

Not sure if I understand your question, but you hide a feature, if you want to hide, in a subassembly, you hide a feature in this assembly and for each occurrence. If you want to toggle you need a loop, and you need an array to keep this information. 
Don’t forget this is functionality can be archived with the simmelar results if you use layer. 

1 reply

RPN
18-Opal
October 31, 2023

I’m not in front of my computer, but just hide the feature, and the ID in the owning assemble. Model to Modelitem is just PRO_PART, Model ID and the Model handle, but you want to hide something in an assembly or in Part. Not every feature type can be hidden, but a component and Datums for sure, else the context is wrong, because you don’t want to hide  A Part in the same Part😉 And a component ID is just the feature handle.

JonC_169-GraniteAuthor
9-Granite
November 1, 2023

thank you here, i get  it done. now i can visit all the component of an assembly and hide them.

but now i have a new problem. i want to select one or some of the part, and hide the others, i tried to use an array to get ones i select, but doesn't work, still hide all parts. do you have any ideas about this function?

RPN
RPN18-OpalAnswer
18-Opal
November 1, 2023

Not sure if I understand your question, but you hide a feature, if you want to hide, in a subassembly, you hide a feature in this assembly and for each occurrence. If you want to toggle you need a loop, and you need an array to keep this information. 
Don’t forget this is functionality can be archived with the simmelar results if you use layer.