25 February 2019

IFC export and some other new nodes

The major update release (134.4.0 and 202.4.0) includes nodes for IFX export.
The nodes is build using the API from the IFC exporter 18.4.0 (for dynamo 1.3.x) and 19.1.0 (for dynamo 2.0.x), meaning the exporter must be installed to use these nodes!



Building the exporter nodes made me realize that some project nodes also was needed


Dropdown for families in the project and selection of all elements by family in the document added.


String.Substring and String.Replace added, these takes lists as input!
can be used for "manually" migration of dynamo files
https://forum.dynamobim.com/t/dynamocore/31912/13
https://forum.dynamobim.com/t/migrate-custom-nodes-to-zero-touch-nodes/31585/8



09 February 2019

Open new view ... active view

I have made a node for opening a new view, this new view will then be the active view when the graph is finished and the dynamo application again is idle. However, this is only one half of what I would like to be able to do with my node. My goal was to be able to close the other open windows in the same process.

That is not possible at the moment due to the way Dynamo works. If it should be possible I need the ability to use events inside a method in Dynamo like this post by Jeremy Tammik describes.

Therefore, is the workaround at the moment as following. Add the “OpenView” node in a graph and then execute the graph and do whatever is needed. When you eventually has finished doing whatever you should, then save and closes the file.

When the file is re-open will the last view be the default view unless starting view is set, in that case, will it be the starting view and that would be correct in those cases.

This new node cannot be called as a background action!

04 February 2019

Associate and Category

Orchid version 134.3.11 / 202.3.11 has been released.
The latest update includes a larger extension of nodes for association.

New node for nested associated elements in families (orange box in image) and node for parameters to verify if "HasAssociated" elements.

Association for global parameters. Associate, GetAssociate and HasAssociated.

Verify if "Family" and FamilyType" has associated elements

Several nodes for Category. Get all built in categories, categories in document, categories by category type and lastly get the category type from categories.

New node for SetType. The node takes an "element" and a "familyType". the element gets the "FamilyType". This can be used when elements need a new type ex. when randomizing. Besides is two new nodes for random created. These nodes take a "range" and return random number(s) in the range. The OOTB node gives the random number in the range 0 to 1.

03 February 2019

Migrate Custom Nodes to Zero Touch nodes

Yet another time has a user problems in migrating a graph using Custom Nodes which are deprecated to the comparative Zero Touch node. It seems there still exist users who cling to to my long-gone DanEDU package which was a CN based package because it is a job to migrate it using my new ZT based package (Orchid)

I have tried if there was any possibility to add old CN nodes in my migration, but that is not possible.

However, I did try to solve this issue for the user, and figured that it is doable to do a “manually” migration using a notepad editor, and it was not that difficult...

It is a good idea to make a dummy file with the corresponding nodes you want to use because you need to know where the assemblies are stored and what the names are, the easiest is to create a graph with the nodes you know you need and then open this file in a notepad so you have the strings you need to replace values with!

The below example is from a 1.3.x graph, since the old graph most likely is from the era with the old layout before the 2.0.x versions.

The below is the node "List.Clean|DanEDU"
<Dynamo.Graph.Nodes.CustomNodes.Function guid="e4e4649b-af37-41d3-bde8-29c4e9181d4a" type="Dynamo.Graph.Nodes.CustomNodes.Function" nickname="List.Clean|DanEDU" x="281.221049098559" y="999.174659610855" isVisible="true" isUpstreamVisible="true" lacing="Shortest" isSelectedInput="False" IsFrozen="false" isPinned="false">
  <PortInfo index="0" default="False" />
  <PortInfo index="1" default="True" />
  <ID value="f39ad724-9216-46d6-9cfc-0e9bb8a71360" />
  <Name value="List.Clean|DanEDU" />
  <Description value="Remove empty list, null and blank values
- former named as RemoveNull" />
  <Inputs>
    <Input value="list" />
    <Input value="searchFor" />
  </Inputs>
  <Outputs>
    <Output value="list" />
  </Outputs>
</Dynamo.Graph.Nodes.CustomNodes.Function>

The below is the ZT node “List.Clean” in the Orchid package
<Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="f166a310-a158-4778-b709-8eb190e878c8" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="List.Clean" x="-0.0783702393594012" y="999.174659610855" isVisible="true" isUpstreamVisible="true" lacing="Shortest" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="..\..\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Orchid\bin\OrchidGeneric.dll" function="Orchid.Generic.Core.List.Clean@var[]..[],var[]..[]">
  <PortInfo index="0" default="False" />
  <PortInfo index="1" default="True" />
</Dynamo.Graph.Nodes.ZeroTouch.DSFunction>
The most important part to keep is the guid mention in the first line after the function, ex. guid="e4e4649b-af37-41d3-bde8-29c4e9181d4a". The guid is the id used in the graph as the connector!
example where a “codeblock” with the connector guid="f7fc68c8-1239-46d9-848c-ef958450c6de" connects to the “List.Clean|DanEDU” node
<Dynamo.Graph.Connectors.ConnectorModel start="f7fc68c8-1239-46d9-848c-ef958450c6de" start_index="0" end="e4e4649b-af37-41d3-bde8-29c4e9181d4a" end_index="0" portType="0" />

Therefore be exceptional observant towards these guid’s!
Likewise do not change the x, y position for the node ex.
x="281.221049098559" y="999.174659610855"

REPLACE to “List.Clean” node
The first string to replace is Dynamo.Graph.Nodes.CustomNodes.Function with Dynamo.Graph.Nodes.ZeroTouch.DSFunction
-– this will replace all the CN nodes functions!!! -–
Next string to replace is nickname="List.Clean|DanEDU" with nickname="List.Clean"
Then add the assembly in the end of the line with isPinned="false">
extend this to isPinned="false" assembly="..\..\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Orchid\bin\OrchidGeneric.dll" function="Orchid.Generic.Core.List.Clean@var[]..[],var[]..[]">
Move on to the other nodes, replacing only the last two strings per node!
Thats it... all the other strings from the “old” node will be removed when you open the graph, then you are good to go...

Try this out by your self...

danedu nodes.dyn
danedu nodes-migrated.dyn




This post is originally published at dynamobim.org