Redefine sketch in assembly

Redefine sketch in assembly

Skadborg.NTI
Advocate Advocate
76 Views
0 Replies
Message 1 of 1

Redefine sketch in assembly

Skadborg.NTI
Advocate
Advocate

I can redefine sketch plane and origin in a partdocument with this code:

Dim oCompDef= ThisApplication.ActiveDocument.ComponentDefinition
Dim oSketch As PlanarSketch = oCompDef.Sketches.Item(1)
oSketch.PlanarEntity = oCompDef.WorkPlanes.Item(2)
oSketch.OriginPoint = oCompDef.WorkPoints.Item(1)

But in an assemblydocument I can only set PlanarEtity. It fails when I try to set OriginPoint ("The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))")

 

Is there a way around this problem?

 

0 Likes
77 Views
0 Replies
Replies (0)