mattmas / Metamorphosis

A tool for watching changes between Revit models, addin and Dynamo.
MIT License
76 stars 23 forks source link

.dyn for Dynamo 2.0 #34

Open MPrez opened 5 years ago

MPrez commented 5 years ago

I tried the json parser in Dynamo 2.0 with no luck. It is way away from working. It would be nice, if it would be updated. Is it planned?

thazell commented 5 years ago

Can you post a screenshot of the status of your graph? It's likely you are missing nodes, such as the Mandrill Package.

MPrez commented 5 years ago

That was my first problem. I was missing DynamoJson. (Dependencies: DynamoJson, Clockwork and Mandrill; could be extended in the description. Now it just says that Mandrill is needed.)

After solving it, I founded the next problem: Get.Keys not working as expected.

https://forum.dynamobim.com/t/metamorphosis-not-working/37469

I tried to solve it with JacobSmall's advice, replacing it with Dictionary.Keys but then the list structure wasn't valid anymore.

m_Capture

Have you tried it in Dynamo 2.x? Is it working for you?

thazell commented 5 years ago

The problem looks like it might be here: image

MPrez commented 5 years ago

I have no idea how the output from List.GetItemAtIndex should look like. Comparing the output from Dictionary.Keys with JsonParser.ToSublist, I changed the Index to 7, but I am not sure if it was right. I could move my error foward, but the other nodes weren't reacting as expected.

I have copied down the output from "WatchDialog", there you can see the whole output of .ToSublists.

image

[0] [0] ModelName [0] [1] Test_Metamorph [1] [0] ModelPath [1] [1] C:\Users...\Metamorphosis Test\Test_Metamorph.rvt [2] [0] PreviousFile [2] [1] C:\Users...\Metamorphosis Test\Test_Metamorph_20190621_0331.sdb [3] [0] ComparisonDate [3] [1] 21.06.2019 16:07:37 [4] [0] NumberOfChanges [4] [1] 17 [5] [0] ModelSummary [5] [1] [0] [0] Levels [5] [1] [0] [1] 21 [5] [1] [1] [0] Title Blocks [5] [1] [1] [1] 2 [5] [1] [2] [0] Detail Items [5] [1] [2] [1] 3 [5] [1] [3] [0] Generic Models [5] [1] [3] [1] 2 [5] [1] [4] [0] Walls [5] [1] [4] [1] 9 [5] [1] [5] [0] Project Information [5] [1] [5] [1] 1 [5] [1] [6] [0] HVAC Zones [5] [1] [6] [1] 1 [5] [1] [7] [0] Materials [5] [1] [7] [1] 370 [5] [1] [8] [0] Dimensions [5] [1] [8] [1] 2 [5] [1] [9] [0] Text Notes [5] [1] [9] [1] 6 [5] [1] [10] [0] Elevations [5] [1] [10] [1] 28 [5] [1] [11] [0] Pipe Segments [5] [1] [11] [1] 12 [5] [1] [12] [0] Reference Planes [5] [1] [12] [1] 2 [5] [1] [13] [0] Spot Elevations [5] [1] [13] [1] 6 [5] [1] [14] [0] Sheets [5] [1] [14] [1] 1 [5] [1] [15] [0] Cameras [5] [1] [15] [1] 7 [5] [1] [16] [0] Section Boxes [5] [1] [16] [1] 7 [5] [1] [17] [0] Lines [5] [1] [17] [1] 2 [5] [1] [18] [0] Guide Grid [5] [1] [18] [1] 6 [5] [1] [19] [0] Plan Region [5] [1] [19] [1] 1 [6] [0] LevelNames [6] [1] [0] FUNDAMENTPLATTE- RUK [6] [1] [1] U1- OK RFB [6] [1] [2] U1- OK FFB [6] [1] [3] U1- UK RD [6] [1] [4] E0- OK RFB [6] [1] [5] E0- OK FFB [6] [1] [6] E0- UK RD [6] [1] [7] E1- OK RFB [6] [1] [8] E1- OK FFB [6] [1] [9] E1- UK RD [6] [1] [10] E2- OK RFB [6] [1] [11] E2- OK FFB [6] [1] [12] E2- UK RD [6] [1] [13] E3- OK RFB [6] [1] [14] E3- OK FFB [6] [1] [15] E3- UK RD [6] [1] [16] E4- OK RFB [6] [1] [17] E4- OK FFB [7] [0] Changes [7] [1] [0] [0] [0] ElementId [7] [1] [0] [0] [1] 2544474 [7] [1] [0] [1] [0] UniqueId [7] [1] [0] [1] [1] 6d587b98-b98b-45b1-915d-be17fbea79fe-0026d35a [7] [1] [0] [2] [0] Category [7] [1] [0] [2] [1] Title Blocks [7] [1] [0] [3] [0] ChangeType [7] [1] [0] [3] [1] ParameterChange [7] [1] [0] [4] [0] Level [7] [1] [0] [4] [1] [7] [1] [0] [5] [0] BoundingBoxDescription [7] [1] [0] [5] [1] [7] [1] [0] [6] [0] ChangeDescription [7] [1] [0] [6] [1] Legende From: Ja to Yes, Linie A0 From: Nein to No, Linie A0 Übersicht From: Nein to No, Linie A1 From: Ja to Yes, Index From: Ja to Yes, Linie A1 Übersicht From: Nein to No, Linie A2 From: Nein to No [7] [1] [0] [7] [0] IsType [7] [1] [0] [7] [1] True [7] [1] [0] [8] [0] MoveDescription [7] [1] [0] [8] [1] [7] [1] [0] [9] [0] RotationDescription [7] [1] [0] [9] [1] [7] [1] [1] [0] [0] ElementId [7] [1] [1] [0] [1] 2382019 [7] [1] [1] [1] [0] UniqueId [7] [1] [1] [1] [1] 2e21be02-2ccb-49f0-a376-e35319961fbc-002458c3 [7] [1] [1] [2] [0] Category [7] [1] [1] [2] [1] Walls [7] [1] [1] [3] [0] ChangeType [7] [1] [1] [3] [1] ParameterChange [7] [1] [1] [4] [0] Level [7] [1] [1] [4] [1] [7] [1] [1] [5] [0] BoundingBoxDescription [7] [1] [1] [5] [1] [7] [1] [1] [6] [0] ChangeDescription [7] [1] [1] [6] [1] Filter Tragend / Nichttragend From: Ja to Yes [7] [1] [1] [7] [0] IsType [7] [1] [1] [7] [1] True [7] [1] [1] [8] [0] MoveDescription [7] [1] [1] [8] [1] [7] [1] [1] [9] [0] RotationDescription [7] [1] [1] [9] [1] [7] [1] [2] [0] [0] ElementId [7] [1] [2] [0] [1] 570537 [7] [1] [2] [1] [0] UniqueId [7] [1] [2] [1] [1] b91fb139-eb5b-4597-89b8-24f1cd86bdda-0008b4a9 [7] [1] [2] [2] [0] Category [7] [1] [2] [2] [1] HVAC Zones [7] [1] [2] [3] [0] ChangeType [7] [1] [2] [3] [1] ParameterChange [7] [1] [2] [4] [0] Level [7] [1] [2] [4] [1] [7] [1] [2] [5] [0] BoundingBoxDescription [7] [1] [2] [5] [1] [7] [1] [2] [6] [0] ChangeDescription [7] [1] [2] [6] [1] Phase From: Keine to None, Name From: Standard to Default [7] [1] [2] [7] [0] IsType [7] [1] [2] [7] [1] False [7] [1] [2] [8] [0] MoveDescription [7] [1] [2] [8] [1] [7] [1] [2] [9] [0] RotationDescription [7] [1] [2] [9] [1] [7] [1] [3] [0] [0] ElementId [7] [1] [3] [0] [1] 769413 [7] [1] [3] [1] [0] UniqueId [7] [1] [3] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd85 [7] [1] [3] [2] [0] Category [7] [1] [3] [2] [1] Pipe Segments [7] [1] [3] [3] [0] ChangeType [7] [1] [3] [3] [1] ParameterChange [7] [1] [3] [4] [0] Level [7] [1] [3] [4] [1] [7] [1] [3] [5] [0] BoundingBoxDescription [7] [1] [3] [5] [1] [7] [1] [3] [6] [0] ChangeDescription [7] [1] [3] [6] [1] Material From: to [7] [1] [3] [7] [0] IsType [7] [1] [3] [7] [1] False [7] [1] [3] [8] [0] MoveDescription [7] [1] [3] [8] [1] [7] [1] [3] [9] [0] RotationDescription [7] [1] [3] [9] [1] [7] [1] [4] [0] [0] ElementId [7] [1] [4] [0] [1] 769414 [7] [1] [4] [1] [0] UniqueId [7] [1] [4] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd86 [7] [1] [4] [2] [0] Category [7] [1] [4] [2] [1] Pipe Segments [7] [1] [4] [3] [0] ChangeType [7] [1] [4] [3] [1] ParameterChange [7] [1] [4] [4] [0] Level [7] [1] [4] [4] [1] [7] [1] [4] [5] [0] BoundingBoxDescription [7] [1] [4] [5] [1] [7] [1] [4] [6] [0] ChangeDescription [7] [1] [4] [6] [1] Material From: to [7] [1] [4] [7] [0] IsType [7] [1] [4] [7] [1] False [7] [1] [4] [8] [0] MoveDescription [7] [1] [4] [8] [1] [7] [1] [4] [9] [0] RotationDescription [7] [1] [4] [9] [1] [7] [1] [5] [0] [0] ElementId [7] [1] [5] [0] [1] 769415 [7] [1] [5] [1] [0] UniqueId [7] [1] [5] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd87 [7] [1] [5] [2] [0] Category [7] [1] [5] [2] [1] Pipe Segments [7] [1] [5] [3] [0] ChangeType [7] [1] [5] [3] [1] ParameterChange [7] [1] [5] [4] [0] Level [7] [1] [5] [4] [1] [7] [1] [5] [5] [0] BoundingBoxDescription [7] [1] [5] [5] [1] [7] [1] [5] [6] [0] ChangeDescription [7] [1] [5] [6] [1] Material From: to [7] [1] [5] [7] [0] IsType [7] [1] [5] [7] [1] False [7] [1] [5] [8] [0] MoveDescription [7] [1] [5] [8] [1] [7] [1] [5] [9] [0] RotationDescription [7] [1] [5] [9] [1] [7] [1] [6] [0] [0] ElementId [7] [1] [6] [0] [1] 769416 [7] [1] [6] [1] [0] UniqueId [7] [1] [6] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd88 [7] [1] [6] [2] [0] Category [7] [1] [6] [2] [1] Pipe Segments [7] [1] [6] [3] [0] ChangeType [7] [1] [6] [3] [1] ParameterChange [7] [1] [6] [4] [0] Level [7] [1] [6] [4] [1] [7] [1] [6] [5] [0] BoundingBoxDescription [7] [1] [6] [5] [1] [7] [1] [6] [6] [0] ChangeDescription [7] [1] [6] [6] [1] Material From: to [7] [1] [6] [7] [0] IsType [7] [1] [6] [7] [1] False [7] [1] [6] [8] [0] MoveDescription [7] [1] [6] [8] [1] [7] [1] [6] [9] [0] RotationDescription [7] [1] [6] [9] [1] [7] [1] [7] [0] [0] ElementId [7] [1] [7] [0] [1] 769417 [7] [1] [7] [1] [0] UniqueId [7] [1] [7] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd89 [7] [1] [7] [2] [0] Category [7] [1] [7] [2] [1] Pipe Segments [7] [1] [7] [3] [0] ChangeType [7] [1] [7] [3] [1] ParameterChange [7] [1] [7] [4] [0] Level [7] [1] [7] [4] [1] [7] [1] [7] [5] [0] BoundingBoxDescription [7] [1] [7] [5] [1] [7] [1] [7] [6] [0] ChangeDescription [7] [1] [7] [6] [1] Material From: to [7] [1] [7] [7] [0] IsType [7] [1] [7] [7] [1] False [7] [1] [7] [8] [0] MoveDescription [7] [1] [7] [8] [1] [7] [1] [7] [9] [0] RotationDescription [7] [1] [7] [9] [1] [7] [1] [8] [0] [0] ElementId [7] [1] [8] [0] [1] 769418 [7] [1] [8] [1] [0] UniqueId [7] [1] [8] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8a [7] [1] [8] [2] [0] Category [7] [1] [8] [2] [1] Pipe Segments [7] [1] [8] [3] [0] ChangeType [7] [1] [8] [3] [1] ParameterChange [7] [1] [8] [4] [0] Level [7] [1] [8] [4] [1] [7] [1] [8] [5] [0] BoundingBoxDescription [7] [1] [8] [5] [1] [7] [1] [8] [6] [0] ChangeDescription [7] [1] [8] [6] [1] Material From: to [7] [1] [8] [7] [0] IsType [7] [1] [8] [7] [1] False [7] [1] [8] [8] [0] MoveDescription [7] [1] [8] [8] [1] [7] [1] [8] [9] [0] RotationDescription [7] [1] [8] [9] [1] [7] [1] [9] [0] [0] ElementId [7] [1] [9] [0] [1] 769419 [7] [1] [9] [1] [0] UniqueId [7] [1] [9] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8b [7] [1] [9] [2] [0] Category [7] [1] [9] [2] [1] Pipe Segments [7] [1] [9] [3] [0] ChangeType [7] [1] [9] [3] [1] ParameterChange [7] [1] [9] [4] [0] Level [7] [1] [9] [4] [1] [7] [1] [9] [5] [0] BoundingBoxDescription [7] [1] [9] [5] [1] [7] [1] [9] [6] [0] ChangeDescription [7] [1] [9] [6] [1] Material From: to [7] [1] [9] [7] [0] IsType [7] [1] [9] [7] [1] False [7] [1] [9] [8] [0] MoveDescription [7] [1] [9] [8] [1] [7] [1] [9] [9] [0] RotationDescription [7] [1] [9] [9] [1] [7] [1] [10] [0] [0] ElementId [7] [1] [10] [0] [1] 769420 [7] [1] [10] [1] [0] UniqueId [7] [1] [10] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8c [7] [1] [10] [2] [0] Category [7] [1] [10] [2] [1] Pipe Segments [7] [1] [10] [3] [0] ChangeType [7] [1] [10] [3] [1] ParameterChange [7] [1] [10] [4] [0] Level [7] [1] [10] [4] [1] [7] [1] [10] [5] [0] BoundingBoxDescription [7] [1] [10] [5] [1] [7] [1] [10] [6] [0] ChangeDescription [7] [1] [10] [6] [1] Material From: to [7] [1] [10] [7] [0] IsType [7] [1] [10] [7] [1] False [7] [1] [10] [8] [0] MoveDescription [7] [1] [10] [8] [1] [7] [1] [10] [9] [0] RotationDescription [7] [1] [10] [9] [1] [7] [1] [11] [0] [0] ElementId [7] [1] [11] [0] [1] 769421 [7] [1] [11] [1] [0] UniqueId [7] [1] [11] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8d [7] [1] [11] [2] [0] Category [7] [1] [11] [2] [1] Pipe Segments [7] [1] [11] [3] [0] ChangeType [7] [1] [11] [3] [1] ParameterChange [7] [1] [11] [4] [0] Level [7] [1] [11] [4] [1] [7] [1] [11] [5] [0] BoundingBoxDescription [7] [1] [11] [5] [1] [7] [1] [11] [6] [0] ChangeDescription [7] [1] [11] [6] [1] Material From: to [7] [1] [11] [7] [0] IsType [7] [1] [11] [7] [1] False [7] [1] [11] [8] [0] MoveDescription [7] [1] [11] [8] [1] [7] [1] [11] [9] [0] RotationDescription [7] [1] [11] [9] [1] [7] [1] [12] [0] [0] ElementId [7] [1] [12] [0] [1] 769422 [7] [1] [12] [1] [0] UniqueId [7] [1] [12] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8e [7] [1] [12] [2] [0] Category [7] [1] [12] [2] [1] Pipe Segments [7] [1] [12] [3] [0] ChangeType [7] [1] [12] [3] [1] ParameterChange [7] [1] [12] [4] [0] Level [7] [1] [12] [4] [1] [7] [1] [12] [5] [0] BoundingBoxDescription [7] [1] [12] [5] [1] [7] [1] [12] [6] [0] ChangeDescription [7] [1] [12] [6] [1] Material From: to [7] [1] [12] [7] [0] IsType [7] [1] [12] [7] [1] False [7] [1] [12] [8] [0] MoveDescription [7] [1] [12] [8] [1] [7] [1] [12] [9] [0] RotationDescription [7] [1] [12] [9] [1] [7] [1] [13] [0] [0] ElementId [7] [1] [13] [0] [1] 769423 [7] [1] [13] [1] [0] UniqueId [7] [1] [13] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd8f [7] [1] [13] [2] [0] Category [7] [1] [13] [2] [1] Pipe Segments [7] [1] [13] [3] [0] ChangeType [7] [1] [13] [3] [1] ParameterChange [7] [1] [13] [4] [0] Level [7] [1] [13] [4] [1] [7] [1] [13] [5] [0] BoundingBoxDescription [7] [1] [13] [5] [1] [7] [1] [13] [6] [0] ChangeDescription [7] [1] [13] [6] [1] Material From: to [7] [1] [13] [7] [0] IsType [7] [1] [13] [7] [1] False [7] [1] [13] [8] [0] MoveDescription [7] [1] [13] [8] [1] [7] [1] [13] [9] [0] RotationDescription [7] [1] [13] [9] [1] [7] [1] [14] [0] [0] ElementId [7] [1] [14] [0] [1] 769424 [7] [1] [14] [1] [0] UniqueId [7] [1] [14] [1] [1] febe5532-ba83-4169-8435-a6aa1e98f6f7-000bbd90 [7] [1] [14] [2] [0] Category [7] [1] [14] [2] [1] Pipe Segments [7] [1] [14] [3] [0] ChangeType [7] [1] [14] [3] [1] ParameterChange [7] [1] [14] [4] [0] Level [7] [1] [14] [4] [1] [7] [1] [14] [5] [0] BoundingBoxDescription [7] [1] [14] [5] [1] [7] [1] [14] [6] [0] ChangeDescription [7] [1] [14] [6] [1] Material From: to [7] [1] [14] [7] [0] IsType [7] [1] [14] [7] [1] False [7] [1] [14] [8] [0] MoveDescription [7] [1] [14] [8] [1] [7] [1] [14] [9] [0] RotationDescription [7] [1] [14] [9] [1] [7] [1] [15] [0] [0] ElementId [7] [1] [15] [0] [1] 1608642 [7] [1] [15] [1] [0] UniqueId [7] [1] [15] [1] [1] fa1bbabc-c9ff-4512-87d2-118b290bee14-00188bc2 [7] [1] [15] [2] [0] Category [7] [1] [15] [2] [1] Title Blocks [7] [1] [15] [3] [0] ChangeType [7] [1] [15] [3] [1] ParameterChange [7] [1] [15] [4] [0] Level [7] [1] [15] [4] [1] E0- OK FFB [7] [1] [15] [5] [0] BoundingBoxDescription [7] [1] [15] [5] [1] [7] [1] [15] [6] [0] ChangeDescription [7] [1] [15] [6] [1] Alternativer Masstabstext From: Nein to No, Automatischer Masstab From: Ja to Yes [7] [1] [15] [7] [0] IsType [7] [1] [15] [7] [1] False [7] [1] [15] [8] [0] MoveDescription [7] [1] [15] [8] [1] [7] [1] [15] [9] [0] RotationDescription [7] [1] [15] [9] [1] [7] [1] [16] [0] [0] ElementId [7] [1] [16] [0] [1] 2542101 [7] [1] [16] [1] [0] UniqueId [7] [1] [16] [1] [1] a214757d-5dbf-4d7a-8f8f-bd5382fd7410-0026ca15 [7] [1] [16] [2] [0] Category [7] [1] [16] [2] [1] Generic Models [7] [1] [16] [3] [0] ChangeType [7] [1] [16] [3] [1] ParameterChange [7] [1] [16] [4] [0] Level [7] [1] [16] [4] [1] E0- OK FFB [7] [1] [16] [5] [0] BoundingBoxDescription [7] [1] [16] [5] [1] 0.227096066802471,-5.47159968039418,0,36.1617321101082,-0.505967887667769,0.492125984251968 [7] [1] [16] [6] [0] ChangeDescription [7] [1] [16] [6] [1] Material From: to [7] [1] [16] [7] [0] IsType [7] [1] [16] [7] [1] False [7] [1] [16] [8] [0] MoveDescription [7] [1] [16] [8] [1] [7] [1] [16] [9] [0] RotationDescription [7] [1] [16] [9] [1]

thazell commented 5 years ago

Looks to me like your problem has to do with the order of the lists that come out of JsonParser.ToSublists and Dictionary.Keys

image

Here is an example of how you could update it: Looks like you'll need to reconfigure it. That script was designed as an example and it's definitely outdated.

Try using the Dictionary.ValueAtKey node image The eventual outputs of this processing should be lists of information, which Dynamo 2.0 has simplified incredibley.

Vladimir-plugin commented 4 years ago

Hello I got the same problem as MPrez, but I don't understand your changes on your picture. I'm not a pro at Dynamo so is it possible for you to add a picture with all modifications or the .dyn file updated ?

Thanks for your help, your addin is great and works good on Revit