[Ma...] Posted June 10, 2022 Share Posted June 10, 2022 Hello, for improve a script I have to use the total number of elements in a project, but, as you can view in the image, this is not correct. Why? I am wrong with something? Thank you very much. Link to comment Share on other sites More sharing options...
[Na...] Posted June 10, 2022 Share Posted June 10, 2022 Hello Marco, I think this will only count visible inspection elements like checks. Different types of Elements have to be counted separately. Regards, Nanno Link to comment Share on other sites More sharing options...
[Ma...] Posted June 10, 2022 Author Share Posted June 10, 2022 But it is under "All elements".. there's a way to count that there are 2 elements (part or mesh)? Link to comment Share on other sites More sharing options...
[Na...] Posted June 10, 2022 Share Posted June 10, 2022 Hello, there is some information and examples on how to access parts in scripting here: https://connect.gom.com/display/GKB/Scripting+in+the+Part-based+Workflow you could print(len(gom.app.project.parts)) for example. Regards, Nanno Link to comment Share on other sites More sharing options...
[Ma...] Posted June 10, 2022 Author Share Posted June 10, 2022 Thank you very much, Monday at work I will try! Have a good weekend! Link to comment Share on other sites More sharing options...
[Ja...] Posted June 11, 2022 Share Posted June 11, 2022 Out of interest What is your goal/use case Marco? Link to comment Share on other sites More sharing options...
[Ma...] Posted June 11, 2022 Author Share Posted June 11, 2022 Hi James! My goal is to put a if condition. If there are 2 parts in project, it shift the second mesh in Y and combines the two meshes. Then it start to separate the cavity of the mesh. Link to comment Share on other sites More sharing options...
[Ma...] Posted June 11, 2022 Author Share Posted June 11, 2022 The purpose, in essence, is to use the cavity division script even with those samples that required two scans. I hope I have explained. Link to comment Share on other sites More sharing options...
[Ja...] Posted June 11, 2022 Share Posted June 11, 2022 Hi marco. Off the top of my mind i would do a count of the part containers , and also number of mesh entities within them. It depends how complex the rest of the project is how much further logic is needed. I dont know the cavity division you mention! Link to comment Share on other sites More sharing options...
[Ma...] Posted June 13, 2022 Author Share Posted June 13, 2022 Please sign in to view this quote. It works perfectly, thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in