Message 1 of 6
Create sketch in machining

Not applicable
06-06-2019
11:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a sketch in machining in a sub-weldment assembly with a ilogic code. But i continuously get this error:
Here is the code i am running from an external rule.Can anyoone help please??
Dim oDoc As Document oDoc = ThisApplication.ActiveEditDocument If oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject If Not oDoc.ComponentDefinition.IsiAssemblyFactory Then If oDoc.ComponentDefinition.Type = objectTypeEnum.kWeldmentComponentDefinitionObject Then 'Keep Selecting Faces, Hit Esc to finish Do oFace = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select a face") If Not oFace Is Nothing Then Exit Do End If Loop While Not oFace Is Nothing oDoc.ComponentDefinition.Machining.edit oSketch = oDoc.ComponentDefinition.Sketches.Add(oFace)
oSketch.edit
End if
End if
End if