r/InventorAPI • u/oomclint • May 09 '20
r/InventorAPI • u/jordanrobot • Mar 02 '21
iPropertyGroups v1.0.1 (iLogic Library)
r/InventorAPI • u/oomclint • Oct 12 '20
iLogic: Show Overridden Dimensions
r/InventorAPI • u/Denis192 • Apr 06 '25
Inventor API and Python
Hello everyone, I'm very new to this sub and have some questions
So I am currently working on my Thesis and I want to create a script that automatically creates Wires in Inventor using Python (maybe it's easier in iLogic if you know please let me know).
Right now the code creates a line and a cricle but I fail to create the Sweep feature and I dont know what I'm doing wrong I was already looking into the Inventor API, searched Reddit and Youtube but cant find any answers.
Maybe some of you know what is wrong and can help me :) Any adivice is appreciated
import win32com.client as wc
inv = wc.GetActiveObject('Inventor.Application')
# Create Part Document
#12290 (Part Document) 8962(Metric System) aus der Inventor API Object Module
inv_part_document = inv.Documents.Add(12290, inv.FileManager.GetTemplateFile(12290, 8962))
#inv_part_document = inv.ActiveDocument
#Set a reference to the part component definition
part_component_definition = inv_part_document.ComponentDefinition
#print(dir(part_component_definition))
#print(part_component_definition.Workplanes.Item(3).Name)
tg = inv.TransientGeometry
#create sketch reference
sketch_path = part_component_definition.Sketches.Add(part_component_definition.Workplanes.Item(3))
# Create a path for the sweep (a line and an angled connection)
Line1 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 0), tg.CreatePoint2d(10, 3))
Line2 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(10, 3), tg.CreatePoint2d(15, 3))
Line3 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(15, 3), tg.CreatePoint2d(15, 0))
# Create a second sketch for the circle (profile for sweep)
sketch_profile = part_component_definition.Sketches.Add(part_component_definition.Workplanes.Item(1))
Circle1 = sketch_profile.SketchCircles.AddByCenterRadius(tg.CreatePoint2d(0, 0), 0.1)
Profile = Circle1
# Sweep-Definition
sweep_def = part_component_definition.Features.SweepFeatures.CreateSweepDefinition(104451, sketch_profile, path, 20485)
# Sweep-Feature
sweep_feature = part_component_definition.Features.SweepFeatures.Add(sweep_def)
import win32com.client as wc
inv = wc.GetActiveObject('Inventor.Application')
# Create Part Document
#12290 (Part Document) 8962(Metric System) aus der Inventor API Object Module
inv_part_document = inv.Documents.Add(12290, inv.FileManager.GetTemplateFile(12290, 8962))
#inv_part_document = inv.ActiveDocument
#Set a reference to the part component definition
part_component_definition = inv_part_document.ComponentDefinition
#print(dir(part_component_definition)) (zeigt alle möglichkeiten an)
#print(part_component_definition.Workplanes.Item(3).Name) heraussfinden welche Ebene
tg = inv.TransientGeometry
#create sketch reference
sketch_path = part_component_definition.Sketches.Add(part_component_definition.Workplanes.Item(3))
# Create a path for the sweep (a line and an angled connection)
Line1 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 0), tg.CreatePoint2d(10, 3))
Line2 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(10, 3), tg.CreatePoint2d(15, 3))
Line3 = sketch_path.SketchLines.AddByTwoPoints(tg.CreatePoint2d(15, 3), tg.CreatePoint2d(15, 0))
# Create a sketch for the circle (profile for sweep)
sketch_profile = part_component_definition.Sketches.Add(part_component_definition.Workplanes.Item(1))
Circle1 = sketch_profile.SketchCircles.AddByCenterRadius(tg.CreatePoint2d(0, 0), 0.1)
Profile = Circle1
# Sweep-Definition
sweep_def = part_component_definition.Features.SweepFeatures.CreateSweepDefinition(104451, sketch_profile, path, 20485)
# Sweep-Feature
sweep_feature = part_component_definition.Features.SweepFeatures.Add(sweep_def)r/InventorAPI • u/oomclint • Jan 14 '21
25 iLogic Routines to Speed Up Drawing Creation
r/InventorAPI • u/oomclint • Oct 24 '20
iLogic: Supress Constraints & Ground All Components
r/InventorAPI • u/oomclint • Jul 26 '20
iLogic: Toggle Mate & Joint Suppression
r/InventorAPI • u/oomclint • May 27 '20
Show Changed Dimensions When Opening Drawings
r/InventorAPI • u/oomclint • Nov 24 '20
Quick Tip: Run “Before Save” Rule Only Once in Assemblies
r/InventorAPI • u/oomclint • May 16 '20
iLogic: Show Flat Pattern Orientation
r/InventorAPI • u/oomclint • Oct 03 '20
iLogic - Occurrence Selection Filter In Drawings
r/InventorAPI • u/oomclint • Dec 19 '20
Export Flat Patterns iPart: Get Name, Export, Repeat
r/InventorAPI • u/MrCannaHub • Feb 03 '21
Seeking experienced designer/engineer to complete a design. Your help is appreciated! Send a message to connect! ☺️
I am currently working on a project, and am in need of some help/direction on completing the design. I am stuck with coming up with the best concept/functionality for the project.
r/InventorAPI • u/Yunaiki • Nov 26 '20
Hardware question. Is a NVIDIA Quadro K620 a good gpu for Inventor?
I am starting to make a desktop build but only have $700 USD max to use. So, I am hoping to pick not the minimum but not the maximum output hardware if I don’t have to. I want to make sure I get the right parts for the job. If that makes sense.
r/InventorAPI • u/oomclint • Aug 01 '20
iLogic Normalise Browser Nodes - With Code
r/InventorAPI • u/oomclint • May 02 '20
Time Sheet Helper for Autodesk Inventor
r/InventorAPI • u/oomclint • Jul 18 '20
Export Formatted Parts List with iLogic
r/InventorAPI • u/oomclint • Aug 01 '20
iLogic: Get & Set User Parameters
r/InventorAPI • u/jordanrobot • Jan 25 '21
InventorCode Announcement
r/InventorAPI • u/oomclint • Dec 05 '20
iLogic Quick Tip: File Open Dialogue
r/InventorAPI • u/elementsam • Aug 25 '20
Idw iLogic help
I wrote an iLogic rule that cycles through each sheet in an idw and creates an AutoCAD dwg. The issue is I can’t figure out how to end the code if there is no next sheet to activate. Any help is appreciated. Thanks!