marcellosgamb / SIMPLEX

This is the repo for the simplex dynamo package workflows
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Dynamo error after installing Simplex #2

Open MarcinTata opened 5 years ago

MarcinTata commented 5 years ago

Hi I was not sure where to place this issue, here or on Dynamo github.

Describe the bug After installing a Simplex I see no typing space in "Code Blocks" + when I try to open node "Python Script" Dynamo crashes.

CodeBlock: https://imgur.com/WFqAyvp

AFTER UNINSTALLING CB's and Pyth node work.

Crash details:

Setting ID operation connectionId coused exeption.

w System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) w System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) w System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) w System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) w PythonNodeModelsWpf.ScriptEditorWindow..ctor(DynamoViewModel dynamoViewModel, PythonNode nodeModel, NodeView nodeView, WindowRect& windowRect) w PythonNodeModelsWpf.PythonNodeViewCustomization.EditScriptContent() w PythonNodeModelsWpf.PythonNodeViewCustomization.view_MouseDown(Object sender, MouseButtonEventArgs e) w System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) w System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) w System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) w System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) w System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) w System.Windows.Input.InputManager.ProcessStagingArea() w System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) w System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) w System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) w System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) w System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) w System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) w MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) w System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) w System.Windows.Application.RunDispatcher(Object ignore) w System.Windows.Application.RunInternal(Window window) w DynamoSandbox.DynamoCoreSetup.RunApplication(Application app)

My setup

marcellosgamb commented 5 years ago

i have seen this issue before. i had to uninstall and reinstall dynamo do you have the same issue with dynamo 1.3.x? Simplex has only been tested with 1.3.x let me ask the dynamo developers to see how to resolve

marcellosgamb commented 5 years ago

could you elaborate on this more? thanks """AFTER UNINSTALLING CB's and Pyth node work"""

MarcinTata commented 5 years ago

I lost a word: After uninstalling SIMPLEX dynamo is fine, 'cb' and 'python script' node works. I will test Simplex on Dynamo1.3.x today and let you know.

MarcinTata commented 5 years ago

Aye, in Dynamo 1.3.3 Simplex does not cause problems mentioned above. However, the package does not connect with Tekla either on Dynamo 2.0.2.

Each time I get: https://imgur.com/e4cvlSU "Could not load model. Is Tekla open?"

I wrote an IronPython script (in Dynamo) to create a beam and it works fine. It links Tekla with Dynamo 1.3 and 2.0.

marcellosgamb commented 5 years ago

connects with Tekla for 1.3.x?

marcellosgamb commented 5 years ago

try it now. I updated simplex and removed the extra dll references that it was not using

MarcinTata commented 5 years ago

It does not connect Tekla with Dyn1.3.3 nor Dyn 2.0.2. After I try Simplex (and it does not work) I freeze those nodes and launch this simple python scritp:

`import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import *

clr.AddReferenceToFileAndPath(r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Tekla.Structures.Model\v4.0_2018.1.0.0__2f04dbe497b71114\Tekla.Structures.Model.dll") import Tekla.Structures.Model from Tekla.Structures.Model import from Tekla.Structures.Model import UI from Tekla.Structures.Model.UI import

clr.AddReferenceToFileAndPath(r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Tekla.Structures\v4.0_2018.1.0.0__2f04dbe497b71114\Tekla.Structures.dll") import Tekla.Structures from Tekla.Structures import*

clr.AddReferenceToFileAndPath(r"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Tekla.Structures.Datatype\v4.0_2018.1.0.0__2f04dbe497b71114\Tekla.Structures.Datatype.dll") import Tekla.Structures.Datatype from Tekla.Structures.Datatype import*

dataEnteringNode = IN

TSM=Tekla.Structures.Model mymodel=TSM.Model()

dynline=IN[0] profile='HEB100' startpnt=Tekla.Structures.Geometry3d.Point(dynline.StartPoint.X,dynline.StartPoint.Y,dynline.StartPoint.Z) endpnt=Tekla.Structures.Geometry3d.Point(dynline.EndPoint.X,dynline.EndPoint.Y,dynline.EndPoint.Z) MyBeam = TSM.Beam(startpnt,endpnt)
MyBeam.Profile.ProfileString=profile

insertbeam=MyBeam.Insert() ##Inserts Beam into Tekla Model finish=mymodel.CommitChanges ` And it works. In 1.3.3 and 2.0.2. Right after I freeze Simplex nodes.

marcellosgamb commented 5 years ago

other than not connecting with Tekla are the other issues solved? the ones previously mentioned? I will look into tekla connection you are using the correct version of tekla?

""""" Describe the bug After installing a Simplex I see no typing space in "Code Blocks" + when I try to open node "Python Script" Dynamo crashes. I lost a word: After uninstalling SIMPLEX dynamo is fine, 'cb' and 'python script' node works. I will test Simplex on Dynamo1.3.x today and let you know. """"""

MarcinTata commented 5 years ago

Yes, other issues are solved. CBs display correctly, "Pyhon Scritp" node opens without crashing Dynamo 2.0.2.

I run on Tekla Structures 2018i.

marcellosgamb commented 5 years ago

dynamo for tekla is supposed to only work with version 2018 not 2018i do you have 2018? to test it?