Last active
April 3, 2018 03:26
-
-
Save yuhan0/c4aed523f735cc234baffcc0d09c4691 to your computer and use it in GitHub Desktop.
Paste directly into Grasshopper canvas to fix multiline panel number parsing issue on Mac. C# component auto-destructs after executing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Archive name="Root"><!--Grasshopper archive--><!--Grasshopper and GH_IO.dll are copyrighted by Robert McNeel & Associates--><!--Archive generated by GH_IO.dll file utility library {0.2.0002}--><items count="1"><item name="ArchiveVersion" type_name="gh_version" type_code="80"><Major>0</Major><Minor>2</Minor><Revision>2</Revision></item></items><chunks count="1"><chunk name="Clipboard"><items count="1"><item name="plugin_version" type_name="gh_version" type_code="80"><Major>0</Major><Minor>9</Minor><Revision>80</Revision></item></items><chunks count="3"><chunk name="DocumentHeader"><items count="5"><item name="DocumentID" type_name="gh_guid" type_code="9">9a66f130-89e9-4d3d-9fb1-30aaebdeb37d</item><item name="Preview" type_name="gh_string" type_code="10">Shaded</item><item name="PreviewMeshType" type_name="gh_int32" type_code="3">1</item><item name="PreviewNormal" type_name="gh_drawing_color" type_code="36"><ARGB>100;150;0;0</ARGB></item><item name="PreviewSelected" type_name="gh_drawing_color" type_code="36"><ARGB>100;0;150;0</ARGB></item></items></chunk><chunk name="DefinitionProperties"><items count="3"><item name="Date" type_name="gh_date" type_code="8">636569315536644620</item><item name="Description" type_name="gh_string" type_code="10"></item><item name="Name" type_name="gh_string" type_code="10">fix_panels_mac.gh</item></items><chunks count="3"><chunk name="Revisions"><items count="1"><item name="RevisionCount" type_name="gh_int32" type_code="3">0</item></items></chunk><chunk name="Projection"><items count="2"><item name="Target" type_name="gh_drawing_point" type_code="30"><X>65</X><Y>193</Y></item><item name="Zoom" type_name="gh_single" type_code="5">1.11803389</item></items></chunk><chunk name="Views"><items count="1"><item name="ViewCount" type_name="gh_int32" type_code="3">0</item></items></chunk></chunks></chunk><chunk name="DefinitionObjects"><items count="1"><item name="ObjectCount" type_name="gh_int32" type_code="3">1</item></items><chunks count="1"><chunk name="Object" index="0"><items count="2"><item name="GUID" type_name="gh_guid" type_code="9">a9a8ebd2-fff5-4c44-a8f5-739736d129ba</item><item name="Name" type_name="gh_string" type_code="10">C# Script</item></items><chunks count="1"><chunk name="Container"><items count="7"><item name="Description" type_name="gh_string" type_code="10">A C#.NET scriptable component</item><item name="InstanceGuid" type_name="gh_guid" type_code="9">ecd4432d-cc47-4d34-a90b-2b420ed72e48</item><item name="Name" type_name="gh_string" type_code="10">C# Script</item><item name="NickName" type_name="gh_string" type_code="10">Fix Panels</item><item name="OutParameter" type_name="gh_bool" type_code="1">false</item><item name="ReferenceCount" type_name="gh_int32" type_code="3">0</item><item name="ScriptSource" type_name="gh_string" type_code="10"> | |
foreach(var obj in GrasshopperDocument.Objects){ | |
var panel = obj as Grasshopper.Kernel.Special.GH_Panel; | |
if (panel==null) continue; | |
panel.SetUserText(panel.UserText.Replace("\r\n", "\n")); | |
} | |
GrasshopperDocument.RemoveObject(this.Component, false); | |
</item></items><chunks count="2"><chunk name="Attributes"><items count="3"><item name="Bounds" type_name="gh_drawing_rectanglef" type_code="35"><X>15</X><Y>8</Y><W>28</W><H>28</H></item><item name="Pivot" type_name="gh_drawing_pointf" type_code="31"><X>29</X><Y>22</Y></item><item name="Selected" type_name="gh_bool" type_code="1">true</item></items></chunk><chunk name="ParameterData"><items count="2"><item name="InputCount" type_name="gh_int32" type_code="3">0</item><item name="OutputCount" type_name="gh_int32" type_code="3">0</item></items></chunk></chunks></chunk></chunks></chunk></chunks></chunk></chunks></chunk></chunks></Archive> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment