Inventor Customization

Posts: 22
Registered: ‎05-04-2001
Message 1 of 2 (122 Views)

add closed sketch loops to existing feature

122 Views, 1 Replies
11-26-2012 02:35 PM

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.




Posts: 22
Registered: ‎05-04-2001
Message 2 of 2 (118 Views)

Re: add closed sketch loops to existing feature

11-26-2012 02:52 PM 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!


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor