how to get Flat pattern is created or not?

how to get Flat pattern is created or not?

Anonymous
Not applicable
639 Views
3 Replies
Message 1 of 4

how to get Flat pattern is created or not?

Anonymous
Not applicable

How to get whether a flat pattern present in the Sheet metal is proper or unresolved ?

 

 

Below is the code I am using

 

Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

 

Dim oCompDef As PartComponentDefinition
Set oCompDef = oDoc.ComponentDefinition

Dim sheetmetalcompdef As SheetMetalComponentDefinition
Set sheetmetalcompdef = oCompDef


Dim bHasFlatpatt As Boolean
bHasFlatpatt = sheetmetalcompdef.HasFlatPattern

 

 

bHasFlatpatt will return true for unresoved Flat pattern also.

 

How to get whether it is resolved or unresolved?

 

0 Likes
640 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Here's the code I use -

 

 

If oPartDoc.SubType <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
    MsgBox "The 'Part' must be a Sheet Metal Part"
    Exit Sub
End If

Dim oSheetMetalCompDef As SheetMetalComponentDefinition
Set oSheetMetalCompDef = oPartDoc.ComponentDefinition
If oSheetMetalCompDef.FlatPattern Is Nothing Then
    MsgBox "Create flat pattern and try again"
    Exit Sub
End If

 

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

"oSheetMetalCompDef.FlatPattern"  will return object for unresolved Flat pattren also.

 

When we create a flat pattren even if it is not created, it will return an object and is not "Nothing".

 

See the attached image for an unresolved Flat pattern icon

 

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Never come across this?

 

I think I'd be checking how the flat pattern was created.

0 Likes