08-21-2018
04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-21-2018
04:32 AM
Ok, now I can see the problem. U've used direct vba syntax. I need to adjust the code for direct iLogic syntax.
Is there any simple way to do this? I've tried like this:
SyntaxEditor Code Snippet
Dim oPD As PartDocument Dim oPCD As PartComponentDefinition Dim oSkt As Sketch Dim oXY As WorkPlane Dim oCentP As WorkPoint Dim oSktPt As SketchPoint oPD = ThisApplication.ActiveDocument oPCD = oPD.ComponentDefinition oXY = oPCD.WorkPlanes.Item("XY Plane") oCentP = oPCD.WorkPoints.Item(1) oSkt = oPCD.Sketches.Item("Szkic2") If Not oSkt.PlanarEntity Is oXY Then oSkt.PlanarEntity = oXY End If oSktPt = oSkt.SketchPoints.Item(1) On Error Resume Next 'Call oSkt.AddByProjectingEntity(oCentP)
but it gives me an error at the end.
I'd like to implement the code into a bigger iLogic rule.
Tomek