Getting sketch entities from a sheet matal "folded" part

Getting sketch entities from a sheet matal "folded" part

isocam
Collaborator Collaborator
333 Views
1 Reply
Message 1 of 2

Getting sketch entities from a sheet matal "folded" part

isocam
Collaborator
Collaborator

Can anybody help?

 

I have a vba macro that can convert a "ipt" file of a "laser-cut profile" directly into a dxf file.

 

The code shown in the attachment works perfectly!!!!

 

I need to do the same thing from a "folded" (un-flatterned) sheet metal "ipt" file.

 

I have found this from the discussion groups to onfold a part

 

Dim oPartDoc As PartDocument

Set oPartDoc = ThisApplication.ActiveDocument

Dim oDef As ControlDefinition

Set oDef = ThisApplication.CommandManager.ControlDefinitions.​Item("PartConvertToSheetMetalCmd")

oDef.Execute

Dim oCompDef As SheetMetalComponentDefinition

Set oCompDef = oPartDoc.ComponentDefinition

oCompDef.Unfold

 

Does anybody know how I can combine the two so that I can automatically create a dxf file directly from a un-flatterned  folded sheet metal part?

 

Many thanks in advance!!!

 

IsoCAM

0 Likes
334 Views
1 Reply
Reply (1)
Message 2 of 2

YuhanZhang
Autodesk
Autodesk

If you mean to only convert a normal part to sheet metal, you can just run the below code:

 

Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
    
' convert to sheet metal
oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"

 

Hope this helps.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes