04-13-2020
06:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-13-2020
06:44 PM
Hi @JelteDeJong again,
As I explained earlier, I managed to create sketch by changing your recommended code as below but I can't add simple sketch entities on it.
Public Sub AddSketch()
Dim testFace As String
testFace = "WebIntFace01"
Dim doc As PartDocument
Set doc = ThisApplication.ActiveDocument
Dim face As face
Set face = doc.AttributeManager.FindObjects(, , testFace)(1)
Dim sketch As PlanarSketch
Set sketch = doc.ComponentDefinition.Sketches.Add(face)
Dim oTransGeom As TransientGeometry
Set oTransGeom = ThisApplication.TransientGeometry
Dim oCircle As SketchCircle
Set oCircle = oSketch1.SketchCircles.AddByCenterRadius(oTransGeom.CreatePoint2d(0, 0), 2)
End Sub
Error it gives is: Run-time error '424':
Object required.
Any idea what am I doing wrong here.
Best regards,
Sam