Message 1 of 3

Not applicable
03-30-2016
08:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What would cause an internal validation error when creating a extrution input?
My source code is below and it gets the error:
RunTimeError 2: InternalValidationError: bSet
def makeBatteries(self): sketches = self.RWO.sketches zYPlane = self.RWO.yZConstructionPlane baseSketch = sketches.add(zYPlane) sketchCircles = baseSketch.sketchCurves.sketchCircles radius = self.diameter/2 for i in range(0, int(self.numberOfBatteries)): batteryOrigin = adsk.core.Point3D.create( (BatteryIntegrator.batteryBoundry+self.diameter)*i+BatteryIntegrator.batteryBoundry+radius,radius, 0) sketchCircles.addByCenterRadius(batteryOrigin, radius) extrudes = self.holder.features.extrudeFeatures for prof in baseSketch.profiles: try: extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation) distance = adsk.core.ValueInput.createByReal(self.length) extInput.setDistanceExtent(False, distance) extrudes.add(extInput) except: self.ui.messageBox(('AddIn Stop Failed: {}').format(traceback.format_exc())) traceback.print_exc()
Solved! Go to Solution.