iLogic Add Thread Feature

iLogic Add Thread Feature

ComputerGuru666
Enthusiast Enthusiast
1,231 Views
1 Reply
Message 1 of 2

iLogic Add Thread Feature

ComputerGuru666
Enthusiast
Enthusiast

Does anyone know if its possible to add a thread feature to a part using iLogic.

 

Basically in the iLogic form if the user selects "Threaded Rod" the existing Extrusion is updated to reflect a cylinder with a length and diameter specified by the user and then I need to have a Thread Added to the cylinder.

 

 

If that makes sense

 

Thank you

Computer Specs:
Windows 7 (64 Bit) Pro. SP1, Inventor 2014 Pro, 3D Connexion SpaceNavigator (Driver 3.15.2)
Motherboard: ASUS Rampage IV Extreme x79 Socket 2011
Processor: Intel Core i7 Six Core Sandy Bridge-E 3.2GHz OCed to 4.7GHz (Under Water)
RAM: G.Skill Ripjaw Z-Series 32 gig quad channel of RAM 1800MHz OCed to 2133MHz
Video Card: 2x Nvidia Geforce GTX 770 (Running Six (6) Monitors)
Monitors: [Primary = 2x 24in HD WS][Secondary = 2x 22in HD WS][Tertiary = 2x 19in FS]
Primary Hard Drive: OCZ Vertex IV 256 GB Solid State Drive
Secondary Hard Drive: OCZ Vertex III 120 GB Solid State Drive
0 Likes
1,232 Views
1 Reply
Reply (1)
Message 2 of 2

Vladimir.Ananyev
Alumni
Alumni

Please try this sample iLogic rule.

It was developed on the basis of the VBA sample "ThreadSample" from Inventor API Help.

Dim oDef as partcomponentdefinition _
	= ThisDoc.Document.componentdefinition

'extrude feature by name (or by item number)
Dim oExtrude As extrudefeature _
	= odef.features.extrudefeatures.item("EXTR")
' Get the face the thread will be applied to.
Dim oFace As Face = oExtrude.SideFaces.Item(1)
' Get the edge the thread extent will be measured from.
Dim oEdge As Edge = oExtrude.EndFaces.Item(1).Edges.Item(1)

' Set a reference to the ThreadFeatures collection object.
Dim oThreadFeatures As ThreadFeatures = oDef.Features.ThreadFeatures

' Define all of the thread information.
Dim oThreadInfo As ThreadInfo
oThreadInfo = oThreadFeatures.CreateStandardThreadInfo( _
    False, True, "ANSI Unified Screw Threads", _
    "1 5/8-6 UN", "2A")
' Create the thread feature.
Dim oThreadFeature As ThreadFeature
oThreadFeature = oThreadFeatures.Add( _
	oFace, oEdge, oThreadInfo, _
    False, False, "2 cm", 0)
oThreadFeature.Name ="iLogic_Maiden_Thread"
Beep ' :)

 iLogic_Thread.PNG

 

Hope this can help you to modify your rule.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network