07-28-2023
06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-28-2023
06:43 AM
I know you already figured something out, but is another very similar example iLogic rule for that same task, just as another idea. It just does a couple things slightly differently, avoiding the need for math, but I used a 'less than one' ratio, as a percentage of the line's length or the point's location, instead of 5x, so that the point would be within the line's geometry. This worked as expected for me too.
Dim oPDoc As PartDocument = ThisDoc.Document
Dim oSketch As PlanarSketch = oPDoc.ComponentDefinition.Sketches.Item(1)
Dim oSLine As SketchLine = oSketch.SketchLines.Item(1)
Dim oP2D As Point2d = oSLine.StartSketchPoint.Geometry.Copy
Dim oV2D As Vector2d = oP2D.VectorTo(oSLine.EndSketchPoint.Geometry)
oV2D.ScaleBy(0.25)
oP2D.TranslateBy(oV2D)
Dim oSPoint As SketchPoint = oSketch.SketchPoints.Add(oP2D, True)
Wesley Crihfield
(Not an Autodesk Employee)