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: 

How do I reverse the direction of a sculptfeature

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
jpblower
402 Views, 3 Replies

How do I reverse the direction of a sculptfeature

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?

3 REPLIES 3
Message 2 of 4
jpblower
in reply to: jpblower

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.

 

Message 3 of 4
VdVeek
in reply to: jpblower

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.

 

Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
Message 4 of 4
jpblower
in reply to: VdVeek

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. 

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

Post to forums  

Autodesk Design & Make Report