- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All
I wanted to add a DistanceDimension between the origin (0,0,0) and a SketchPoint , but I could not get it to work.
In the end I had to add a Sketch point on the origin and then I could add the distanceDimension between the 2 sketch points..., It works and I can drive the point from my user prams.
Here is the code I'm using:
Origin = adsk.core.Point3D.create(0, 0, 0)
dims = sketch.sketchDimensions
sketchPoints = sketch.sketchPoints
point = adsk.core.Point3D.create(0, -(UserStoneFinalHeight.value) , 0)
SketchPointOrigin = sketchPoints.add(Origin)
sketchPoint = sketchPoints.add(point)
stoneDim = dims.addDistanceDimension(sketchPoint, SketchPointOrigin, 0 , adsk.core.Point3D.create(3,-3,0))
stoneDim.parameter.expression = 'StoneFinalHeight'
How do I should I declare the Origin in the addDistanceDim... statement, I tried Origin and adsk.core.Point3D.create(0, 0, 0)
Cheers, Stephen
Solved! Go to Solution.