Hello,
I'm building a product configurator which includes some helical curves.
I want to find out how I can change the direction of a Helical curve feature in a 3D sketch.
Variables like pitch and diameter are parameters, but the direction isn't.
Can somebody help me with this?
Thanks in advance
Ok, I found out the code for the coilfeature:
DimoPartCompDefAsPartComponentDefinition
oPartCompDef=ThisApplication.ActiveDocument.ComponentDefinition
oPartCompDef.Features.CoilFeatures.Item("Coil1").ClockwiseRotation=True
But I can't find similar code for a helical curve in a 3D sketch..
Hi and welcome to the forum!
I have actually been looking at this a little bit over the last couple of days. I haven't been able to find anything (except the way to do it in a coil feature, but you have already discovered that yourself).
In fact, I can't understand how the API even sees a helical curve in a 3D sketch. I found that the API sees a couple of 3D sketch entities--a SketchLines3D object, which I assume is the straight axis; and a SketchFixedSplines3D object, which I assume represents the helical curve. But I can't find any of the parameters or settings that can be accessed by editing the helical curve. I don't know if these objects are accessible from the API. If they are, they have been well hidden...
Here is where I found the objects I mentioned above:
Would using a coil feature instead work for you? At least we know how to control those!
Cameron Whetten
Inventor 2014
Hi Cameron,
Thanks for your response.
It's funny, yesterday evening I was looking around the internet for some kind of debug method.
And I found the same overview you posted .
I also noted it found those objects, but I couldn't find any parameters which describe the helical curve.
Also I searched the entire Object Browser in VBA if I could find anything, but also nothing .
The Helical Curve will be used to create a pattern, so I'd prefer using that option.
I tried another option which works, but is less pretty.
I can make a coil feature, and use an edge of that coil as the curve for my pattern.
Then afterwards, I cut the coil away and what remains is pretty much the same.
But it's kind of a workaround in my opinion..
It's unfortunate that the 3D sketch helical curve properties aren't exposed in the API. In fact, you'll find that the deeper you dig into the object heirarchy, the more things you will find that you can do in Inventor but that aren't available to control in the API. However, the Inventor development team has a good history of making more and more functionality available to the API in every release of the software.
In the mean time, I was going to suggest creating a coil feature then you could use an edge, but you thought of it already!
You mentioned that you have to cut away the coil feature afterwards, so I assume you are creating a solid. You could create the coil as a surface feature instead, then there would be no need to cut away material. All you would have to do is turn off the visibility of the surface feature. You can still use the edge of a surface feature as a pattern curve.
Cameron Whetten
Inventor 2014