Redefine Assembly Extrusion Sketch- Is it available in API?

Redefine Assembly Extrusion Sketch- Is it available in API?

Tiffany_Hayden_
Collaborator Collaborator
494 Views
3 Replies
Message 1 of 4

Redefine Assembly Extrusion Sketch- Is it available in API?

Tiffany_Hayden_
Collaborator
Collaborator

I would like to redefine a sketch that is consumed by an extrusion within an assembly. I just want to change which plane the sketch looks at for the assembly cut. I'm having trouble finding it in the API. I have tired going through both the sketch object and the extrusion object and came up blank. 

 

 

Tiffany_Hayden__1-1692799983571.png

 

Tiffany_Hayden__2-1692800096730.png

 

I've tried both planarsketch and Sketch objects. 

Tiffany_Hayden__3-1692800153866.png

 

when going through the extrusion I don't see any relationship to the sketches. 

 

Tiffany_Hayden__4-1692800264469.png

 

Tiffany Hayden
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

0 Likes
Accepted solutions (1)
495 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor
Accepted solution

Hi @Tiffany_Hayden_ 

The redefine plane method we do not have access to via the API for either a part or an assembly. I searched around on a few post and while people attempted a hidden version it seems not to be there. What does seem to work is to change the planar entity of the sketch. See this post here.

 

    
    sketch.PlanarEntity = partDef.WorkPlanes.Item(1)
If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 4

Tiffany_Hayden_
Collaborator
Collaborator

I was just about to go down that path! lol

 

Tiffany_Hayden__0-1692801543146.png

 

Tiffany Hayden
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

0 Likes
Message 4 of 4

Tiffany_Hayden_
Collaborator
Collaborator

@A.Acheson I got it to work resetting the PlanarEntity on the sketch. Thanks! 

 

Tiffany_Hayden__0-1692802287493.png

 

Tiffany Hayden
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