Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

add closed sketch loops to existing feature

1 REPLY 1
Reply
Message 1 of 2
ilotey
303 Views, 1 Reply

add closed sketch loops to existing feature

is there a way to use vb to add closed sketch loops to an existing feature?

 

I am trying to create a parametric template for a fan guard assembly, complete with drawings.

 

I am using an arrangement of circles defined using some linear sketch patterns as the cross-section of a revolved feature.  Using ilogic/vb, I want to automate the number and spacing of items in the linear pattern, and then update the loops selected for the revolved feature.

 

I have found code on this forum (courtesy of Curtis Waguespack) that I can use to select all closed loops and create a feature.  I can apply this code to create a NEW revolved feature, but I haven't been able to figure out how to use it to UPDATE an existing feature.

 

I need the feature to UPDATE rather than create new to maintain links in my assemblies and drawings.

 

Any help is appreciated.

 

 

 

1 REPLY 1
Message 2 of 2
ilotey
in reply to: ilotey

got it.

 

Set oRevolve = oCompDef.Features.RevolveFeatures.Item("revFaceWires") 'get the feature
Set oSketch = oRevolve.Profile.Parent 'get the sketch
oRevolve.Profile.Parent.Edit 'edit the sketch
Set oProfile = oSketch.Profiles.AddForSolid 'get the profile loops and save to oProfile
ThisApplication.CommandManager.ControlDefinitions.Item("FinishSketch").Execute 'exit the sketch edit
oRevolve.Profile = oProfile 'update the profile definition for oRevolve
oPartDoc.Update 'update the doc

 

 

part updates, drawing doesn't break.  YAY!

 

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

Post to forums  

Autodesk Design & Make Report