oldfox
Alibre Super User
I'm still confused when I read "Help". I'm missing something in the AddExtrudeBoss script syntax.
Here is the code snippet:
# Create part
Nut = Part("%sBA Hex Nut" % (SI[Choice]))
print "\nYou have specified a %sBA Hex Nut" % SI[Choice]
# hex nut
HexNut = Nut.AddSketch("Nut", Nut.GetPlane("XY-Plane"))
HexNut.AddPolygon(0, 0, HexAcrossFlats, 6, False)
HexNut.AddExtrudeBoss("Hex Nut", Nut, Thickness, True)
The last line is the one causing the error I think. I can comment it out and the error doesn't raise it's ugly head again.
And here is the error:
You have specified a 3xx Hex Nut
System.MissingMemberException: 'Sketch' object has no attribute 'AddExtrudeBoss'
at IronPython.Runtime.Binding.PythonGetMemberBinder.FastErrorGet`1.GetError(CallSite site, TSelfType target, CodeContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at AlibreScript.UI.IronTextBoxControl.#ijb(Object #9A)
>>>
What I need here is the "silver bullet". All help is appreciated. Thanks.
Here is the code snippet:
# Create part
Nut = Part("%sBA Hex Nut" % (SI[Choice]))
print "\nYou have specified a %sBA Hex Nut" % SI[Choice]
# hex nut
HexNut = Nut.AddSketch("Nut", Nut.GetPlane("XY-Plane"))
HexNut.AddPolygon(0, 0, HexAcrossFlats, 6, False)
HexNut.AddExtrudeBoss("Hex Nut", Nut, Thickness, True)
The last line is the one causing the error I think. I can comment it out and the error doesn't raise it's ugly head again.
And here is the error:
You have specified a 3xx Hex Nut
System.MissingMemberException: 'Sketch' object has no attribute 'AddExtrudeBoss'
at IronPython.Runtime.Binding.PythonGetMemberBinder.FastErrorGet`1.GetError(CallSite site, TSelfType target, CodeContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at AlibreScript.UI.IronTextBoxControl.#ijb(Object #9A)
>>>
What I need here is the "silver bullet". All help is appreciated. Thanks.