0 1 1 633803473875432000 0 6 12 true true Shaded txtLines.ghx 633803426863192000 0 11 -3 1 0 9 88c3f2b5-27f7-48a2-9528-1397fad62b93 DotNET C# Script //TxtLines //written by Giulio Piacentino //version 2009 06 11 //Other tools and updates at www.giuliopiacentino.com/grasshopper-tools/ if(content != null && content != String.Empty && face != null && face != String.Empty && pt != null){ if(size == 0) size = 5; //--From http://en.wiki.mcneel.com/default.aspx/McNeel/AddTextItem OnPlane plane = new OnPlane(RhUtil.RhinoActiveCPlane()); plane.SetOrigin(pt); OnTextEntity2 text_entity = new OnTextEntity2(); MRhinoAnnotationText text_object = new MRhinoAnnotationText(); text_object.SetAnnotation(text_entity); text_object.SetTextHeight(size); text_object.SetString(content); text_object.SetPlane(plane); int idx = doc.m_font_table.FindOrCreateFont(ref face, bold, italics); text_object.SetFontIndex(idx); //--End from //Now, this is a hack, but otherwise I dont get it to work! doc.AddObject(text_object, true, false); doc.DeleteObject(new MRhinoObjRef(text_object)); OnCurve[] crvs; text_object.Explode(out crvs); A = crvs; } else { Print("Some content is required."); } 0 txtLines abe04b46-2e2e-4d20-aa76-f41486e2917d false true longest_list 269.25 156.5 94 124 319.25 158.5 23 120 319.25 158.5 true true false 6 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 84fa917c-1ed8-4db3-8be1-7bdc4a6495a2 Variable var Script Variable var true true 2 3ede854e-c753-40eb-84cb-b48008f14fd4 Output Print, Reflect and Error streams true false 8ec86459-bf01-4409-baee-174d0d2b13d0 Result A Represents a list of generic data true false face 34429b33-c30f-4783-a3d8-6ac73f23c5b0 true true 1 409d95e1-9efc-4f3b-8fd9-8971b497d561 0 string true 271.25 158.5 48 20 271.25 158.5 48 20 271.25 158.5 true true false bold 613c25dc-f0db-4fc6-8289-2dbe764895e8 true true 1 b6193737-2d86-469d-bb96-177dc24f2b72 0 bool true 271.25 178.5 48 20 271.25 178.5 48 20 271.25 178.5 true true false italics ddae7c3d-61b9-4acb-809c-e792e3c924d1 true true 0 0 bool true 271.25 198.5 48 20 271.25 198.5 48 20 271.25 198.5 true true false size c7ce8bab-e3a9-4f69-a124-5e0b36b820af true true 1 344d7b64-46e1-4e94-b997-8c593df5e871 0 int true 271.25 218.5 48 20 271.25 218.5 48 20 271.25 218.5 true true false content 371db174-c7e0-4e77-9afb-8fd72f63d050 true true 1 463d746c-a320-4c28-8ae5-0f4110329bc7 0 string true 271.25 238.5 48 20 271.25 238.5 48 20 271.25 238.5 true true false pt 572c2709-d3c1-425f-9b61-7961956eac5c true true 1 1e6972bc-6bdd-414c-9abf-a8e2d1878d2c 0 On3dPoint true 271.25 258.5 48 20 271.25 258.5 48 20 271.25 258.5 true true false e20eae24-0d15-47c8-9eae-db95285008b2 true true 0 0 0 342.25 158.5 19 60 342.25 158.5 19 60 342.25 158.5 true true false A 34546378-642c-4c7e-ae1a-a86ad507cb9b true true 0 0 342.25 218.5 19 60 342.25 218.5 19 60 342.25 218.5 true true false 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel 463d746c-a320-4c28-8ae5-0f4110329bc7 true true 0 0 How are you? true true 0 false 0 0 0 255 255 250 90 255 103 239 150 20 103 239 150 20 103 239 false true false Microsoft Sans Serif 10 false false 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel 409d95e1-9efc-4f3b-8fd9-8971b497d561 true true 0 0 Verdana true true 0 false 0 0 0 255 255 250 90 255 102 158 150 20 102 158 150 20 102 158 false true false Microsoft Sans Serif 10 false false fbac3e32-f100-4292-8692-77240a42fd1a Point Pt 1e6972bc-6bdd-414c-9abf-a8e2d1878d2c true true 0 0 1 193.05 258.5 60 20 193.05 258.5 60 20 193.05 258.5 false true false -22.5649463488825 0.0378041095087363 0 d51e9b65-aa4e-4fd6-976c-cef35d421d05 Planar Srf Planar 299d0d40-9958-4c12-a0c8-c46284f75813 false true longest_list 410.75 220.5 65 56 431.75 222.5 23 52 431.75 222.5 false true false E e5a16b9e-2b8e-45b7-9838-6fb3b92cdd1f true true 1 1 34546378-642c-4c7e-ae1a-a86ad507cb9b 0 0 false 412.75 222.5 19 52 412.75 222.5 19 52 412.75 222.5 false true false S d024aee3-460b-46cf-9035-57b02d417ec3 true true 0 0 0 false 454.75 222.5 19 52 454.75 222.5 19 52 454.75 222.5 false true false 962034e9-cc27-4394-afc4-5c16e3447cf9 Extrude Extr 594b9d96-4b34-4410-856f-6b757b395595 true true longest_list 522.25 236.5 66 44 544.25 238.5 23 40 544.25 238.5 false true false B 7c48e4f5-8f6a-4e41-aab0-7a2e98ab0111 true true 1 d024aee3-460b-46cf-9035-57b02d417ec3 0 0 524.25 238.5 20 20 524.25 238.5 20 20 524.25 238.5 false true false D b7f0ccbb-ae68-4752-a999-9041ae3541ea true true 0 0 1 524.25 258.5 20 20 524.25 258.5 20 20 524.25 258.5 false true false 0 0 0.251742437557673 E 2998d982-3476-48c4-86e7-e9be8ee66f67 true true 0 0 0 567.25 238.5 19 40 567.25 238.5 19 40 567.25 238.5 false true false 2e3ab970-8545-46bb-836c-1c11e5610bce Integer Int 344d7b64-46e1-4e94-b997-8c593df5e871 true true 0 0 1 192.85 220.3 60 20 192.85 220.3 60 20 192.85 220.3 false true false 5 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel txtLines 38a2f79c-fad9-4b58-9327-976e9a2bd5b5 true true 0 0 TxtLines allows to extract fonts from your computer's font library, similarly to Rhino's text command. Simply write your text... done! true true 0 false 0 0 0 255 255 161 0 255 22 11 294 85 22 11 294 85 22 11 false true false Microsoft Sans Serif 10 false false cb95db89-6165-43b6-9c41-5702bc5bf137 Boolean Bool b6193737-2d86-469d-bb96-177dc24f2b72 true true 0 0 1 false 192 179 60 20 192 179 60 20 192 179 false true false true