21 January 2019

HasAssociated and Convert

New release there includes some new nodes...

Check if family parameter has associated element (...in upper right corner).
PostEdit: Associate nodes is updated


Node there converts shared parameters to family parameters.

After the last update of all family document nodes, is all nodes also updated changing the output to the most suited instead of document as output.

This post is originally published at dynamobim.org

AddIfcParameters and updates

Orchid version 134.3.10 / 202.3.10 has been released.

The largest change in this version is that the package has been refactored to comply with naming conventions.

The next largest change is all FamilyDocument nodes don’t pass the document as an output, likewise, other nodes there passed project documents. I have made this rather large change to be able to support ”ListLevel” better, I have noticed many users have problems understanding that the output changes dramatically for passing the opened document when list level is used. Therefore do all now need to use the DataStream.Await to let documents being passed.

Updated family document example...

One of the new nodes is AddIfcParameters, this one adds the four most important IFC parameters.
Parameters are found in the IFC Shared Parameters.txt that works together with the Revit IFC exporter! 
http://help.autodesk.com/view/RVT/2019/ENU/?guid=GUID-7119A8C3-A0EE-4568-8C35-750410D867C9
https://github.com/Autodesk/revit-ifc/tree/master/Source/RevitIFCTools

PARAM     3c9ac775-15e4-4ba5-8edb-4167e3fb4151     IFC CAD Layer   TEXT  
PARAM     8df7e965-feaf-403f-8290-d4c289c99840      IfcDescription     TEXT    
PARAM     a3e2f9a7-f184-4d16-80e7-349181e17d3d      IfcExportAs     TEXT    
PARAM     9a17f9c0-c41b-4ceb-8279-b20e789fa3a8      IfcExportType     TEXT    

Parameter example...

I have also changed the icon layout for all nodes. All large icons are now 128x128 px, and I have started to use a green and yellow color in icons. Family document icons have got a new border to show they are only for Family documents. I am still trying to keep the general layout used by the Dynamo team.

This post is originally published at dynamobim.org

FamilyName

I have made some supplemental nodes for Element and ElementType to get FamilyName and Name for ElementType!



The new FamilyName nodes might come handy when it is needed to figure if a wall is a Curtain Wall or a Basic Wall :-)

This post is originally published at dynamobim.org

Shared Parameters

Yet another update (132.3.9 / 201.3.9)… new nodes created for Shared Parameters.

The idea with the “SetFile” node is to be able to set a temporary SP file while doing stuff, and in the end, return to the original SP file. If you want to test it without any “Stuff”, then use the Circut node, set it to false and then you can verify that the SP file changes. Then test it with the Circuit set to true and you should end up with the file you had in your file (remember to reset between the two tests!).

The two “query” nodes get all the parameters in the SP file and group them either by type or by group name.

This post is originally published at dynamobim.org

Subcategory nodes

more new nodes for getting families, familytypes, and nodes for subcategories.
-released in the 201.3.8 / 132.3.8 version of Orchid

This post is originally published at dynamobim.org

Orchid: new nodes

I have just updated to 132.3.7 / 201.3.7 versions. They both support the newly released 2.0.2 and 1.3.4 version of Dynamo as well.

One major change is that the two versions are now split into individual installers. I have evaluated that the time is up for this since the 2.0 version has been around for some time and that many new users don’t use the old 1.3 series anymore. However, there is still a world out there that need to be compatible with the 1.3 series. I will in the future develop against the 2.0 series but maintain the 1.3 series as long as it is possible without doing anything extra. Over time will the development of the 1.3 series stop.

By this version, I have also removed the last Custom Nodes meaning all nodes in the package is now Zero Touch nodes (The last four CN nodes for FEM-design).

This update also adds some new nodes and some updated nodes as well. Among these is the node there can tell the user if an update of the package exists!

new...
Does category/document contain?


Several nodes for materials


updated...
This post is originally published at dynamobim.org

Print nodes

I have made a new set of Print nodes, incl. a new node for the “ActiveView” that handles any kind of view incl. sheet view, which the OOTB node do not handle!



This post is originally published at dynamobim.org

Compound structures nodes

I have started to expand my nodes for compound structures (system family)...

This post is originally published at dynamobim.org

System variables nodes

In the establishment of the Orchid sample collection did I recognize the need for using system variables for directories. Therefore have I made nodes for this.


The "About" nodes help the user maintaining the package. Place the "Update" node at the canvas and it will look if an update is available. In case there is, the node will open a web browser with the GitHub address.

This post is originally published at dynamobim.org

Parameter nodes

I have Improved the Parameter nodes and extended it with two more nodes. The AddSharedParameter node and the AddProjectParameter can now be used to update category binding if the parameter exists in the project in advance. Furthermore is the ChangeCategory node used for changing/updating category binding. The DeleteParameter node is for removing/deleting a parameter in the project.

This post is originally published at dynamobim.org

Distribute dynamo in an organizational context

There is on occasional basis questions concerning “How to distribute Dynamo and Dynamo packages” especially in an organizational context. The main problem seems to be how to update and maintain that users in a network share the same packages.

I have previously argued for a solution that included “Inno Setup” from http://www.jrsoftware.org this is the same installer used by the dynamo-team to distribute Dynamo, and most important, it is freeware but the developers would be happy for donations :-)

There has been some debate in another post, where I argued that the added article that described how to do it using notepad++ was a very limited solution. I will try to explain why.

Let's say you have an organization where the environment consists of workstations and laptops, a mixed environment, which is very common nowadays.

One option would be that you can have a server location for your packages, but this only solves the problem for the workstations, this is not a good solution for the laptops. Well then use VPN… no, not really. It is a limitation if your environment is dependent on a VPN tunnel for “ordinary” work done on your laptop, this should only be the case in time-limited work processes. This is why licenses are being distributed as they are… usually something there just looks for a valid license but nothing else than that. This is being solved in many ways.

So you are left now with an organization where no one has a shared connection and we want something to work the same way on all computers… especially do we want it to be updated whenever something new is done.

On the other hand do the BIM-manager not want to disturb the IT/Server people over and over again, for updating some odd thing called dynamo…

This is why Inno Setup is the answer. Go talk with the IT admins and let them understand that they need to let the login procedure add two executables. One for the machine startup and one for the user login.

Most of the below-shown code (iss files) can be set up using third parties tools for Inno Setup, but there is some line of Pascal code needed, just copy it, edit it and you should be good to go.

The main idea is, that the BIM manager can maintain--on his/ her personal computer--how the organizational environment should look like. When changes occur, then simply compile new executables and copy the files to the agreed location with the IT admins, Then next time someone restarts/login, then changes will be updated automatically… and individually! However, maintained central :-)

What is being handled on a machine level should include privileges for powerusers or admins, by doing this, then “shared” packages cannot be changed. This can be setup in a way so it still works concerning the “read/write” problem. However, this method can be extended into being a “fixmyproblem” executable users can run from start bottom if something occurs. In that case simply skip checking for the version number.

Dynamo (machine).iss
Preprocessor variables
;My Dynamo path
;Replace --> (your login)
#dim sourcePackages[4]
#define sourcePackages[0] "C:\Users\(your login)\AppData\Roaming\Dynamo\Content\packages"
#define sourcePackages[1] "C:\Users\(your login)\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages"
#define sourcePackages[2] "C:\Users\(your login)\AppData\Roaming\Dynamo\Dynamo Revit\2.0\packages"

;Dynamo path
;Replace --> (your organization id)
#dim destinationPackages[3]
#define destinationPackages[0] "{commonappdata}\Dynamo\(your organization id)\All\packages"
#define destinationPackages[1] "{commonappdata}\Dynamo\(your organization id)\130\packages"
#define destinationPackages[2] "{commonappdata}\Dynamo\(your organization id)\200\packages"

[Setup]
;SourceDir=..\

;give a valid path where your output exe files should be compiled to!
OutputDir=userdocs:\SoftDev\

OutputBaseFilename=Dynamo_machine
AppName=Dynamo
;Versionnumber must be higher to install updates --> I use dates
AppVersion=2018.1101.0
;Replace --> author
AppCopyright= author
;Replace --> organization
AppPublisher= organization
RestartIfNeededByRun=false
AllowCancelDuringInstall=false
CreateAppDir=false
UsePreviousGroup=false
AppendDefaultGroupName=false
SolidCompression=true
Compression=lzma2/ultra
InternalCompressLevel=ultra
Uninstallable=false

;Normally will changes on a computer level in an organization require more than user privileges
PrivilegesRequired=poweruser
;PrivilegesRequired=none

[InstallDelete]
;Clean old packages
Type: filesandordirs; Name: {#destinationPackages[0]}
Type: filesandordirs; Name: {#destinationPackages[1]}
Type: filesandordirs; Name: {#destinationPackages[2]}

[Files]
;Packages to include
;Do only select those that shold be common, you might have several more packages installed by yourself

;Version specific packages, means that it takes those that are for either 1.3 og 2.0 environment
;In the example is all packages in the "source" folder selected!
Source: {#sourcePackages[1]}\*; DestDir: {#destinationPackages[1]}; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[2]}\*; DestDir: {#destinationPackages[2]}; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs

;Common packages, means that the package is used both in the 1.3 og 2.0 environment
;In the example is specific packages in the "source" selected!
Source: {#sourcePackages[0]}\Dynamic CSharp Interpreter\*; DestDir: {#destinationPackages[0]}\Dynamic CSharp Interpreter; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\archi-lab.net\*; DestDir: {#destinationPackages[0]}\archi-lab.net; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Data-Shapes\*; DestDir: {#destinationPackages[0]}\Data-Shapes; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Rhythm\*; DestDir: {#destinationPackages[0]}\Rhythm; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\spring nodes\*; DestDir: {#destinationPackages[0]}\spring nodes; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Ampersand\*; DestDir: {#destinationPackages[0]}\Ampersand; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\BumbleBee\*; DestDir: {#destinationPackages[0]}\BumbleBee; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\MEPover\*; DestDir: {#destinationPackages[0]}\MEPover; Excludes: Backup\; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Structural Analysis for Dynamo\*; DestDir: {#destinationPackages[0]}\Structural Analysis for Dynamo; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Optimo\*; DestDir: {#destinationPackages[0]}\Optimo; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Honeybee\*; DestDir: {#destinationPackages[0]}\Honeybee; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs
Source: {#sourcePackages[0]}\Ladybug\*; DestDir: {#destinationPackages[0]}\Ladybug; Excludes: dyf\backup; Flags: recursesubdirs createallsubdirs

[Registry]
;Version number
;Replace --> (your organization id)
Root: HKLM; Subkey: Software\(your organization id) ; ValueType: string; ValueName: Dynamo; ValueData: {#SetupSetting("AppVersion")}

[Code]
//Get the AppVersion
function CurrentVersion(): String;
begin
  Result := ExpandConstant('{#SetupSetting("AppVersion")}');
end;

//Get the Registry value
//Replace --> (your organization id)
function GetInstalledVersion(): String;
     var
         InstalledVersion: String;
     begin
         InstalledVersion:= '';
         RegQueryStringValue(HKLM, 'Software\(your organization id)', 'Dynamo', InstalledVersion);
         Result:= InstalledVersion;
     end;

//On initialize, check if higher value
function InitializeSetup(): boolean;
begin
    if (GetInstalledVersion() < CurrentVersion()) then
        result := true
    else
        result := false;
end;

Dynamo (user).iss
;Preprocessor variables
;My Dynamo path
#dim dynamoPath[2]
#define dynamoPath[0] "Dynamo\Dynamo Revit\1.3"
#define dynamoPath[1] "Dynamo\Dynamo Revit\2.0"

[Setup]
SourceDir=..\

;give a valid path where your output exe files should be compiled to!
OutputDir=userdocs:\SoftDev\

OutputBaseFilename=DTU_Dynamo_user
AppName=Dynamo
;Versionnumber must be higher to install updates --> I use dates
AppVersion=2018.1001.0
;Replace --> author
AppCopyright= author
;Replace --> organization
AppPublisher= organization
RestartIfNeededByRun=false
AllowCancelDuringInstall=false
CreateAppDir=false
UsePreviousGroup=false
AppendDefaultGroupName=false
SolidCompression=true
Compression=lzma2/ultra
InternalCompressLevel=ultra
Uninstallable=false
PrivilegesRequired=none

[Files]
;Default filestructure
;This part is ONLY needed if dynamo hasnt been installed and activated before this executable is being activated! 
;look in the attached zip file for default content needed by the executable is runned before dynamo has been activated!
;Notice the source folder location if you want to use the default (from the zip file) content!
Source: Content\*.*; DestDir: {userappdata}; Flags: createallsubdirs recursesubdirs; Permissions: powerusers-full

[Registry]
;Version number
;Replace --> (your organization id)
Root: HKCU; Subkey: Software\(your organization id); ValueType: string; ValueName: Dynamo; ValueData: {#SetupSetting("AppVersion")}

[code]
//Get the AppVersion
function CurrentVersion(): String;
begin
  Result := ExpandConstant('{#SetupSetting("AppVersion")}');
end;

//Get the Registry value
//Replace --> (your organization id)
function GetInstalledVersion(): String;
     var
         InstalledVersion: String;
     begin
         InstalledVersion:= '';
         RegQueryStringValue(HKCU, 'Software\(your organization id)', 'Dynamo', InstalledVersion);
         Result:= InstalledVersion;
     end;

//On initialize, check if higher value
function InitializeSetup(): boolean;
begin
    if (GetInstalledVersion() < CurrentVersion()) then
        result := true
    else
        result := false;
end;

//Modify the XML document
procedure DynamoXML(const AFileName, APath, AValue: string); 
var
  XMLDocument, XMLNewNode, XMLRootNode : Variant;   
begin 
  XMLDocument := CreateOleObject('Msxml2.DOMDocument.6.0'); 
  XMLDocument.async := False; 
  XMLDocument.load(AFileName); 
  if XMLDocument.parseError.errorCode <> 0 then
    exit;
  XMLNewNode := XMLDocument.createElement('string');
  XMLDocument.setProperty('SelectionLanguage', 'XPath');    
  XMLRootNode := XMLDocument.selectSingleNode(APath); 
  XMLRootNode.appendChild (XMLNewNode);
  XMLRootNode.lastChild.text := AValue; 
  XMLDocument.save(AFileName);
end; 

//On exit, modify
//Replace --> (your organization id)
procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssPostInstall then
  begin
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[0]}\DynamoSettings.xml'),'//BackupFiles',ExpandConstant('{userappdata}\Dynamo\Dynamo Revit\backup\backup.DYN'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[0]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{userappdata}\{#dynamoPath[0]}'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[0]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{commonappdata}\Dynamo\All'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[0]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{commonappdata}\Dynamo\130'));

    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[1]}\DynamoSettings.xml'),'//BackupFiles',ExpandConstant('{userappdata}\Dynamo\Dynamo Revit\backup\backup.DYN'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[1]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{userappdata}\{#dynamoPath[1]}'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[1]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{commonappdata}\Dynamo\All'));
    DynamoXML(ExpandConstant('{userappdata}\{#dynamoPath[1]}\DynamoSettings.xml'),'//CustomPackageFolders',ExpandConstant('{commonappdata}\Dynamo\200'));
  end;
end;
This post is originally published at dynamobim.org