Detect sheet metal part

Programming and macros
User avatar
Hansjoerg
Posts: 106
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 72
x 55

Detect sheet metal part

Unread post by Hansjoerg »

I am looking for a way to query if a part contains a sheet metal feature.

For weldments there is a command isWeldment which allows to easily query if the feater tree contains a weldment feature without traversing the structure.

Is there something like this for sheet metal features?
by AlexB » Tue Jan 31, 2023 11:48 am
From a suggestion I received some time ago, this works well for my application.

Code: Select all

// c# code
bool isSheetMetal = swModel.GetBendState() > 0;
return isSheetMetal;
Edit to add:
It returns an enumeration telling what state the sheet metal part is in:
image.png
Go to full post
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
AlexB
Posts: 434
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 21
x 240
x 383

Re: Detect sheet metal part

Unread post by AlexB »

From a suggestion I received some time ago, this works well for my application.

Code: Select all

// c# code
bool isSheetMetal = swModel.GetBendState() > 0;
return isSheetMetal;
Edit to add:
It returns an enumeration telling what state the sheet metal part is in:
image.png
User avatar
Hansjoerg
Posts: 106
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 72
x 55

Re: Detect sheet metal part

Unread post by Hansjoerg »

Great!

Works even if the sheet metal part contains no bends at all

Thanks for this tip
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
Post Reply