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"
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
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.
Blog: hjalte.nl - github.com
Can't find what you're looking for? Ask the community or share your knowledge.