File this one under, "Just because you can, does not mean you should."
A colleague had called my attention to the fact that, in Windows 10, you are allowed to use emojis in file names. (Press the Window key + . to call up a dialog that allows you to select one.) I was pretty sure AutoCAD would have a problem with that, but I was surprised to find that I was able to create a file called 🍕.dwg and AutoCAD had no problems with it.
I do not recommend doing this with project files. I will also note that I did nothing beyond creating the file. I have not fully tested this. For example, I did not see what happens if I try to externally reference this file, or even just inserting it as a block into another file.
July 31, 2020
July 10, 2020
Dynamo: Building User Options into a Graph
The goal of the graph on which I was working when I needed to know how to add Shared Parameters to the Other Parameter Group was to allow a user to easily add additional shared parameters that we use to track issued Sheets in our Drawing List Schedule. Our template files have the first ten of these in them, and for some projects, that is enough. Others have many more than ten issuances, particularly those that track issuances during the design phases. We have twenty additional Shared Parameters in our Shared Parameter file; adding more than one of them is tedious, at best.
Using the Parameter.AddSharedParameter node from Erik Falck Jørgensen's Orchid package makes it easy to bulk-add Shared Parameters in a Dynamo graph. For this particular task, however, I wanted to be able to offer the end user the choice of adding the second group of ten parameters, the third group of ten parameters or both the second and third groups of ten parameters, without creating separate graphs for each group of ten additional parameters, and without the user having to go into the graph and make adjustments. My solution was to use a Python Script node to handle the user options. Two separate lists of the Shared Parameter names are created, and two Boolean nodes with Is Inupt set allow the user to choose to include one or both of those lists when the graph is run. The Python Script node has four inputs; two for the lists (IN[0] and IN[2]) and two for the Boolean nodes (IN[1] and IN[3]). The image below shows the simple Python code that gathers the input values and then tests the Boolean values, adding the associated list of Shared Parameter names to the output list if the Boolean is set to True.
In Dynamo Player, when the user finds the graph file and selects the Edit Inputs tool, this is what she or he sees: Both Booleans are intially set to False. Should the user run the graph with both set to False, the Parameter List result will display the string to which the listOut variable is set if the list is empty: "Select at least one set of Parameters to add. " The user only needs to click on the "switch" displayed for each "Add Issues" Boolean to toggle it to True.
The switch turns green when set to True. Once the desired list(s) are set to True, selecting the Play tool will run the graph and the selected Shared Parameters will be added to the active project. The Parameter List result will display a list of the names of the Shared Parameters that were added.
As always, you can select an image to see it full size.
Using the Parameter.AddSharedParameter node from Erik Falck Jørgensen's Orchid package makes it easy to bulk-add Shared Parameters in a Dynamo graph. For this particular task, however, I wanted to be able to offer the end user the choice of adding the second group of ten parameters, the third group of ten parameters or both the second and third groups of ten parameters, without creating separate graphs for each group of ten additional parameters, and without the user having to go into the graph and make adjustments. My solution was to use a Python Script node to handle the user options. Two separate lists of the Shared Parameter names are created, and two Boolean nodes with Is Inupt set allow the user to choose to include one or both of those lists when the graph is run. The Python Script node has four inputs; two for the lists (IN[0] and IN[2]) and two for the Boolean nodes (IN[1] and IN[3]). The image below shows the simple Python code that gathers the input values and then tests the Boolean values, adding the associated list of Shared Parameter names to the output list if the Boolean is set to True.
In Dynamo Player, when the user finds the graph file and selects the Edit Inputs tool, this is what she or he sees: Both Booleans are intially set to False. Should the user run the graph with both set to False, the Parameter List result will display the string to which the listOut variable is set if the list is empty: "Select at least one set of Parameters to add. " The user only needs to click on the "switch" displayed for each "Add Issues" Boolean to toggle it to True.
The switch turns green when set to True. Once the desired list(s) are set to True, selecting the Play tool will run the graph and the selected Shared Parameters will be added to the active project. The Parameter List result will display a list of the names of the Shared Parameters that were added.
As always, you can select an image to see it full size.
July 02, 2020
Dynamo: Other Parameter Group
Long time, no post. If anyone is still reading this blog, I hope you and your families are doing well in these trying times. A combination of being busy with work (remotely) and not having anything about which to write caused this rather long gap between posts.
I came across something today that I wanted to document for future reference. I was working on a Dynamo graph to automate the adding of specific shared parameters as project parameters in a Revit project file, using the Parameter.AddSharedParameter node from Erik Falck Jørgensen's Orchid package.
One of the required inputs is the Group under which the parameter will be organized. The particular parameters with which I was dealing are a continuation of ten that we already have in our project template files, and they are located under the "Other" group. The Select BuiltIn Parameter Group node that ships with Dynamo is used to generate the needed value, but PG_OTHER is not on the list from which you select. The first item on the list, INVALID, might not seem like something you would want to select, but in this case, that is the correct choice, to have the parameters created placed under the Other category.
I came across something today that I wanted to document for future reference. I was working on a Dynamo graph to automate the adding of specific shared parameters as project parameters in a Revit project file, using the Parameter.AddSharedParameter node from Erik Falck Jørgensen's Orchid package.
One of the required inputs is the Group under which the parameter will be organized. The particular parameters with which I was dealing are a continuation of ten that we already have in our project template files, and they are located under the "Other" group. The Select BuiltIn Parameter Group node that ships with Dynamo is used to generate the needed value, but PG_OTHER is not on the list from which you select. The first item on the list, INVALID, might not seem like something you would want to select, but in this case, that is the correct choice, to have the parameters created placed under the Other category.
Labels:
Dynamo,
Parameter,
Parameter Group
Subscribe to:
Posts (Atom)