API Inventor,

API Inventor,

Anonymous
Not applicable
536 Views
6 Replies
Message 1 of 7

API Inventor,

Anonymous
Not applicable

Here is a pretty  complicated task, would be really pleased for any help

 

Create a round table with manually changing diameter (scroll). The number of legs depends on diameter

 

need to:

crate a sketch and extrude details

release an assembly

create all constrains

create an interface for set parameters of details

0 Likes
537 Views
6 Replies
Replies (6)
Message 2 of 7

rikard.nilsson
Collaborator
Collaborator
Hi,

I think you go for iLogic.
I think it will be quite easy to create something that you describe with iLogic.

/Rikard
0 Likes
Message 3 of 7

tolgay.hickiran
Advisor
Advisor

I'm with Rikard here.

 

If you are not on a mission to learn the API, you definetely go for ilogic because the case you are describing is actually a really easy one.


Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 4 of 7

Anonymous
Not applicable
The problem is: I need to do this with API, this is work for University.
0 Likes
Message 5 of 7

rikard.nilsson
Collaborator
Collaborator
Hi,

It would be interesting to know why you need it to be API instead of using iLogic.

And one other thing.. I can't answer for everyone. But to get help it's better to ask specific questions of the problems that you have when you try to code.

If you haven't started yet I recommend to start reading the examples in the API help. There are a lot of examples that fits your question.

Regards
Rikard
0 Likes
Message 6 of 7

Anonymous
Not applicable

Could you help me, please? Can't find syntaxis for creation a hole. Sorted out a face 

 

 Dim RotationFaceOfAxis As Inventor.Face

        For Each RotationFaceOfAxis In oDocDef.Features.ExtrudeFeatures(1).Faces
            If RotationFaceOfAxis.SurfaceType = Inventor.SurfaceTypeEnum.kCylinderSurface Then Exit For
        Next
        If RotationFaceOfAxis.SurfaceType <> Inventor.SurfaceTypeEnum.kCylinderSurface Then Return

and don't know, what to do next 
0 Likes
Message 7 of 7

Anonymous
Not applicable

Hi! I made everything, just have a little problem: because my table is cylinder, there is an extra leg in center. Can I somehow avoid it?

 

 Dim oEdge As Inventor.Edge
        For Each oFace As Inventor.Face In oDetail.SurfaceBodies(1).Faces
            If oFace.SurfaceType = Inventor.SurfaceTypeEnum.kCylinderSurface Then
                For Each oEdge In oFace.Edges
                    If oEdge.GeometryType = Inventor.CurveTypeEnum.kCircleCurve Then

                        ''Другой компонент по новому вектору
                        Dim sFileName As String = "C:\Inventor\Nozhka.ipt"
                        Dim oCylinder1 As Inventor.ComponentOccurrence = oAssyDoc.ComponentDefinition.Occurrences.Add(sFileName, oPositionMatrix)

                        For Each oCylFace As Inventor.Face In oCylinder1.SurfaceBodies(1).Faces
                            If oFace.SurfaceType = Inventor.SurfaceTypeEnum.kCylinderSurface Then
                                Dim oConstr As Inventor.AssemblyConstraint = oAssyDoc.ComponentDefinition.Constraints.AddMateConstraint(oFace, oCylFace, 0, Inventor.InferredTypeEnum.kInferredLine, Inventor.InferredTypeEnum.kInferredLine)
                                Exit For
                            End If
                        Next

                        Exit For
                    End If
                Next
            End If
        Next

0 Likes