When I reach this line in my code I get a sculpt feature but with an error
Set ptfeatSculpt = ptfeatsSculpt.Add(ocSculpt, kNewBodyOperation)
But after the feature is created all I need to do is reverse the direction and all works fine. How do I do this using code? Or better yet how do I determine if there's an error and then reverse the direction?
Solved! Go to Solution.
Solved by jpblower. Go to Solution.
Just found the answer. It's in the sculpt surface. A sculpt surface has a direction property.
How to change the direction after the fact is still a mystery but if you can change it before performing the sculpt you're good.
You gave little information, especialy the code was minimal. From the code you gave i can't see what properties you gave to the oScult object.
In the Api there is some information to define the direction of the sculpt surface. Standard it's the Positive Direction.
SculptFeatures.CreateSculptSurface Method SculptFeatures.CreateSculptSurface( Surface As Object, [Direction] As PartFeatureExtentDirectionEnum ) As SculptSurface
Valid input is kPositiveExtentDirection, kNegativeExtentDirection or kSymmetricExtentDirection. If no value is specified, then kPositiveExtentDirection will be assumed for the direction. |
Rob.
Sorry if the question didn't seem clear. I assumed that the direction option would be hidden somewhere in the feature, not the surface.
When performing a sculpt command without coding, the direction of the sculpting is handled with the sculpt command. I can't individually change the settings on a surface itself, only when performing the sculpt. One would expect the direction option would also be coded in the sculpt feature. However the option is contained within the sculptsurface. Maybe it's just me but that is not intuitive at all. Plus what do I do when I need to alter the direction? If I create a sculpt feature using a certain sculptsurface, changing the surface direction after creating the feature does nothing.
It seems to me that having the option to change the direction of the sculpt as a feature option rather than a surface property would make more sense, flow with the general procedure, and give the programmer more flexibility. I only discovered that the surface property changes the direction setting by accident.