Message 1 of 3

Not applicable
03-25-2016
08:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm usingin the following code to create a construction point that I will use to create a plane by 3 Points. But the rwohPoint is null when the input is added. What would cause this failure. I know the input point is valid and everything is in the context of the rootComponent so no occurence should be needed.
points = self.design.rootComponent.constructionPoints pointInput = points.createInput() rwohDirectionPoint = adsk.core.Point3D.create(point.x+rwohDirection.x, point.y+rwohDirection.y, point.z+rwohDirection.z) self.ui.messageBox("rwohDirectionPoint: "+str(rwohDirectionPoint.asArray())) pointInput.setByPoint(rwohDirectionPoint) self.ui.messageBox("Valid?: "+str(pointInput.isValid)) rwohPoint = points.add(pointInput) self.ui.messageBox("rwohPoint:"+str(rwohPoint)) # rwohPoint = rwohPoint.createForAssemblyContext(occ) pointInput = points.createInput() newDirectionPoint = adsk.core.Point3D.create(point.x+self.normal.x, point.y+self.normal.y, point.z+self.normal.z) pointInput.setByPoint(newDirectionPoint) newPoint = points.add(pointInput) # newPoint = newPoint.createForAssemblyContext(occ) planes = self.design.rootComponent.constructionPlanes planeInput = planes.createInput() planeInput.setByThreePoints(originProxy, rwohPoint, newPoint) planes.add(planeInput)
Solved! Go to Solution.