r/InventorAPI • • May 09 '20

iLogic Theme Switcher

Thumbnail
self.autodeskinventor
1 Upvotes

r/InventorAPI • • Mar 02 '21

iPropertyGroups v1.0.1 (iLogic Library)

Thumbnail
self.autodeskinventor
2 Upvotes

r/InventorAPI • • Oct 12 '20

iLogic: Show Overridden Dimensions

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Apr 06 '25

Inventor API and Python

4 Upvotes

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 • • Jan 14 '21

25 iLogic Routines to Speed Up Drawing Creation

Thumbnail
clintbrown.co.uk
4 Upvotes

r/InventorAPI • • Oct 24 '20

iLogic: Supress Constraints & Ground All Components

Thumbnail
clintbrown.co.uk
4 Upvotes

r/InventorAPI • • Jul 26 '20

iLogic: Toggle Mate & Joint Suppression

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • May 27 '20

Show Changed Dimensions When Opening Drawings

Thumbnail
self.autodeskinventor
2 Upvotes

r/InventorAPI • • Nov 24 '20

Quick Tip: Run “Before Save” Rule Only Once in Assemblies

Thumbnail
clintbrown.co.uk
3 Upvotes

r/InventorAPI • • May 16 '20

iLogic: Show Flat Pattern Orientation

Thumbnail
self.autodeskinventor
2 Upvotes

r/InventorAPI • • Feb 06 '21

ConfigLoader Release

Thumbnail
self.autodeskinventor
4 Upvotes

r/InventorAPI • • Oct 03 '20

iLogic - Occurrence Selection Filter In Drawings

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Aug 22 '20

iLogic Properties Tool-Tip #3

Thumbnail
clintbrown.co.uk
1 Upvotes

r/InventorAPI • • Dec 12 '20

iLogic - File Open Timer

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Dec 19 '20

Export Flat Patterns iPart: Get Name, Export, Repeat

Thumbnail
clintbrown.co.uk
3 Upvotes

r/InventorAPI • • Feb 03 '21

Seeking experienced designer/engineer to complete a design. Your help is appreciated! Send a message to connect! ☺️

3 Upvotes

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 • • Nov 26 '20

Hardware question. Is a NVIDIA Quadro K620 a good gpu for Inventor?

2 Upvotes

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 • • Aug 01 '20

iLogic Normalise Browser Nodes - With Code

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • May 02 '20

Time Sheet Helper for Autodesk Inventor

Thumbnail
self.autodeskinventor
2 Upvotes

r/InventorAPI • • Nov 28 '20

Run iLogic Rules from the Ribbon

Thumbnail
clintbrown.co.uk
3 Upvotes

r/InventorAPI • • Jul 18 '20

Export Formatted Parts List with iLogic

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Aug 01 '20

iLogic: Get & Set User Parameters

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Jan 25 '21

InventorCode Announcement

Thumbnail
self.autodeskinventor
4 Upvotes

r/InventorAPI • • Dec 05 '20

iLogic Quick Tip: File Open Dialogue

Thumbnail
clintbrown.co.uk
2 Upvotes

r/InventorAPI • • Aug 25 '20

Idw iLogic help

2 Upvotes

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!