Community
PowerShape and PowerMill API Forum
Welcome to Autodesk’s PowerShape and PowerMill API Forums. Share your knowledge, ask questions, and explore popular API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Listing solid faces

3 REPLIES 3
Reply
Message 1 of 4
jem_hi85
150 Views, 3 Replies

Listing solid faces

Hi, is it possible to get a tip on how to list the faces of the solid and which face is selected? I am totally stuck with this problem. (C#) 

 

3 REPLIES 3
Message 2 of 4
luc_ponsaerts
in reply to: jem_hi85

Can you try this ;

powerShape.Execute('INFO SHOW');
string s = powerShape.ExecuteEx('UPDATE_INFO OPTIONS DETAILEDINFO ON SHOW').ToString();

 

The string s can than be analyzed for selected faces.

Message 3 of 4
jem_hi85
in reply to: luc_ponsaerts

Thanks for the tip!

But I don't quite understand how this should work. This gives the variable 's' a length of zero? Is the purpose here to read the text from the "info" window, or what?

 

Well, one way or another, it seems that there are no functions to handle the faces of the solid!?! 

 

Now I just have to write the code and convert the solid to surfaces and then read surfaces names and convert back to solid. 😄

Message 4 of 4
luc_ponsaerts
in reply to: jem_hi85

Yes, I made a mistake by thinking that when it works with the PowerMill API, it would work with the PowerShape API too.

In case of powerMill, one has to disable the Dialogs first , in case of powershape, this would be :

powerShape.DialogsOff() and powerShape.FormUpdateOff()

As when using it in the powermill API, I expected then the info data to appear in the command window. What appears in the command window can be read in a string as I mentioned before.

However, using the Powershape API, the info data do not  appear in the command window.

Hence, the code won't work for powershape. 

I will have to look further.

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

Post to forums  

Technology Administrators