


{"id":254173,"date":"2021-12-27T07:19:46","date_gmt":"2021-12-27T07:19:46","guid":{"rendered":"\/forum\/forums\/topic\/error-with-spaceclaim-scripting-2\/"},"modified":"2021-12-27T07:19:46","modified_gmt":"2021-12-27T07:19:46","slug":"error-with-spaceclaim-scripting-2","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/error-with-spaceclaim-scripting-2\/","title":{"rendered":"Error with Spaceclaim scripting"},"content":{"rendered":"<p> Error with Spacescripting when record mesh generate and rerun the code. <\/p>\n<p> it is fine using debug mode and error using run mode. <\/p>\n<p>&nbsp;<\/p>\n<p> code: <\/p>\n<p> # Create\/Edit Mesh<br \/> options = CreateMeshOptions()<br \/> options.SolidElementShape = ElementShapeType.Hexahedral<br \/> options.SurfaceElementShape = ElementShapeType.QuadDominant<br \/> options.BlockingType = BlockingDecompositionType.BoundingBox<br \/> bodySelection = BodySelection.Create(GetRootPart().Bodies[0])<br \/> sweepFaceSelection = Selection.Empty()<br \/> result = CreateMesh.Execute(bodySelection, sweepFaceSelection, options)<br \/> # EndBlock <\/p>\n<p>&nbsp;<\/p>\n<p> Error messeage:<br \/> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.<br \/> &nbsp; &nbsp;at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)<br \/> &nbsp; &nbsp;at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)<br \/> &nbsp; &nbsp;at SpaceClaim.UserInterface.ScriptHelper.ExecuteAllOnMainThread[T](GetValue`1 task)<br \/> &nbsp; &nbsp;at SpaceClaim.Api.V21.Scripting.Commands.CreateMesh.Execute(ISelection bodies, ISelection sourceFaces, CreateMeshOptions options, ICommandInfo info)<br \/> &nbsp; &nbsp;at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame)<br \/> &nbsp; &nbsp;at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)<br \/> &nbsp; &nbsp;at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)<br \/> &nbsp; &nbsp;at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)<br \/> &nbsp; &nbsp;at Microsoft.Scripting.Interpreter.DynamicInstruction`6.Run(InterpretedFrame frame)<br \/> &nbsp; &nbsp;at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) <\/p>\n","protected":false},"template":"","class_list":["post-254173","topic","type-topic","status-closed","hentry","topic-tag-aim-faq"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["244163"],"_bbp_likes_count":["0"],"_btv_view_count":["1562"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["254173"],"_bbp_forum_id":["27789"],"_bbp_engagement":["3452","244163"],"_bbp_voice_count":["2"],"_bbp_reply_count":["8"],"_bbp_last_reply_id":["259419"],"_bbp_last_active_id":["259419"],"_bbp_last_active_time":["2021-12-27 08:19:31"]},"test":"gulingdong126-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/254173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/254173\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=254173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}