Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Curvy Loft into Straight Loft

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
TobFischer94
421 Views, 2 Replies

Change Curvy Loft into Straight Loft

Hello friends,

 

I posted this problem earlier in this forum  (https://forums.autodesk.com/t5/inventor-forum/straight-loft-transition-how-to/td-p/8734343) but my own answer was mistakenly accepted as solution (while it was more of a question), so here is me trying to articulate it better:

 

I create a Loft via a rule. 

The file is downloadable in the linked thread (Loft.ipt), i get an error message when i try to upload it again. After running the rule called "Loft", it can be seen that the loft is very curvy. But instead of a curvy Loft, i want a straight Loft.

Making multiple small Lofts (from Sketch 1 To Sketch 2, from Sketch 2 To Sketch 3, From Sketch 3 To Sketch 4 etc.) is a method that makes the Loft straight. Does anyone know how i have to change my code to apply this method? I guess i have to change the For...next loop, but due to my lack of experience i am unsure. Help would be very appreciated.

 

My code:

Dim oDoc As PartDocument
oDoc = ThisDoc.Document
Dim pcd = oDoc.ComponentDefinition
Dim oCol As ObjectCollection
oCol = ThisApplication.TransientObjects.CreateObjectCollection

For i = 1 To 5
oCol.Add(pcd.Sketches("Sketch"&i).Profiles.AddForSolid)
Next i

Dim oLoftDef As LoftDefinition
oLoftDef = pcd.Features.LoftFeatures.CreateLoftDefinition(oCol, kNewBodyOperation)
Dim oLoftF As LoftFeature
oLoftF = pcd.Features.LoftFeatures.Add(oLoftDef)
oLoftF.Name = "Loft1"

comparison.JPG

2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: TobFischer94

i accidentally posted the answer in the original post...

https://forums.autodesk.com/t5/inventor-forum/straight-loft-transition-how-to/m-p/9079858/highlight/true#M764003

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
TobFischer94
in reply to: JelteDeJong

thank you thank you thank you!! it works perfectly

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report