Mirror feature in sheetmetal flatpattern tree using ilogic

Mirror feature in sheetmetal flatpattern tree using ilogic

Anonymous
Not applicable
716 Views
7 Replies
Message 1 of 8

Mirror feature in sheetmetal flatpattern tree using ilogic

Anonymous
Not applicable

Hello,

I tried to create mirror feature in sheet metal flatpattern tree using illogic but its getting error saying

"Public member 'Workplane1' on type 'SheetMetalComponentDefinition' not found"

 

Mirror Plane = Workpalne1

Mirror feature = Bend_stopper1 & Bend_stopper1

 

My code is below:

 

oDoc = ThisApplication.ActiveDocument

Dim oCompDef As SheetMetalComponentDefinition
oCompDef = oDoc.ComponentDefinition

'Defining Mirror plane For Mirror 
    oMirrorPlane = oCompDef.Workplane1.Item("WorkPlane1")
    oMirrorPlane.Visible= True
            
'Defining object Collection For Mirror features
    Dim objCol As ObjectCollection
    objCol = ThisApplication.TransientObjects.CreateObjectCollection
    objCol.Clear()
    objCol.Add(oCompDef.Features("Bend_stopper1,Bend_stopper2"))
                
'Creating Mirror of Bend stopper           
    Dim oMi As MirrorFeature
    oMi = oCompDef.Features.MirrorFeatures.Add (objCol, oMirrorPlane, True, "Bend_stopper1,Bend_stopper2")

Can anyone please help me to resolving it.

0 Likes
717 Views
7 Replies
Replies (7)
Message 2 of 8

bradeneuropeArthur
Mentor
Mentor
Dim oDoc As Inventor.PartDocument
oDoc= ThisDoc.Document 'ThisApplication.ActiveDocument

Dim oPartCompDef As Inventor.PartComponentDefinition
oPartCompDef = oDoc.ComponentDefinition

Dim oCompDef As Inventor.SheetMetalComponentDefinition
oCompDef =  oDoc.ComponentDefinition

'Defining Mirror plane For Mirror 
Dim wp As Inventor.WorkPlane

    Dim oMirrorPlane = oPartCompDef.WorkPlanes.Item("Work Plane1")
    oMirrorPlane.Visible= True
            
'Defining Object Collection For Mirror features
    Dim objCol As ObjectCollection
    objCol = ThisApplication.TransientObjects.CreateObjectCollection
    objCol.Clear()
    objCol.Add(oCompDef.Features("Bend_stopper1,Bend_stopper2"))
                
'Creating Mirror of Bend stopper           
    Dim oMi As MirrorFeature
    oMi = oCompDef.Features.MirrorFeatures.Add (objCol, oMirrorPlane, True, "Bend_stopper1,Bend_stopper2")

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 8

Anonymous
Not applicable

@bradeneuropeArthur,

 

If I use your code also still I am getting error (refer attached screen shot).

 

0 Likes
Message 4 of 8

bradeneuropeArthur
Mentor
Mentor
Is you mirror Plane excactly called "Work Plane1"
Are your Featuresexcactly called "Bend_stopper1" and "Bend_stopper2"

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 8

bradeneuropeArthur
Mentor
Mentor
Is you mirror Plane excactly called "Work Plane1"
Are your Features excactly called "Bend_stopper1" and "Bend_stopper2"

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 6 of 8

Anonymous
Not applicable

@bradeneuropeArthur

 

Yes, the mirror plane is "Work Plane1" and the features are "Bend_stopper1" and "Bend_stopper2"  only.

These are created in flat pattern tree (refer attached screen shot).

 

 

Regards,

Lakshmana D Kumar

0 Likes
Message 7 of 8

Anonymous
Not applicable

Hello @bradeneuropeArthur,

 

Can you please help us to resolve the errors?

0 Likes
Message 8 of 8

bradeneuropeArthur
Mentor
Mentor
Yes of course.
I am far away from my desk.
I will ASAP next week.
Please send me a private message so I will not forget.

Regards

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes