Trying to put together a script component to insert block. please help - Grasshopper2024-03-29T10:42:37Zhttps://www.grasshopper3d.com/forum/topics/trying-to-put-together-a-script-component-to-insert-block-please?commentId=2985220%3AComment%3A799042&feed=yes&xn_auth=noMarc,
Thanks for sharing th…tag:www.grasshopper3d.com,2016-08-18:2985220:Comment:15835282016-08-18T04:29:33.682ZLibny Pachecohttps://www.grasshopper3d.com/profile/LibnyPacheco561
<p>Marc, </p>
<p></p>
<p>Thanks for sharing this definition. It's straight forward and easy to use.</p>
<p>Marc, </p>
<p></p>
<p>Thanks for sharing this definition. It's straight forward and easy to use.</p> Hi Rui,
Just read your post..…tag:www.grasshopper3d.com,2013-03-20:2985220:Comment:8136122013-03-20T14:27:55.514ZMarc Hoppermannhttps://www.grasshopper3d.com/profile/MarcHoppermann
<p>Hi Rui,</p>
<p>Just read your post... Nice to see that people make use of the definition I posted some time ago...</p>
<p>For previewing you could just insert your block and delete it every time a value updates... In a way that is a way of "previewing".</p>
<p>Just add a global variable to keep track of all the block references (GUIDs) which you delete everytime the component updates... With an additional boolean toggle you can then control bake/delete (preview on/off). Attached a simple…</p>
<p>Hi Rui,</p>
<p>Just read your post... Nice to see that people make use of the definition I posted some time ago...</p>
<p>For previewing you could just insert your block and delete it every time a value updates... In a way that is a way of "previewing".</p>
<p>Just add a global variable to keep track of all the block references (GUIDs) which you delete everytime the component updates... With an additional boolean toggle you can then control bake/delete (preview on/off). Attached a simple setup on how this works.</p>
<p>Another way would be to bake a special user text with the block. This way you can keep track of the baked objects in the file itself which will allow you to filter these blocks later on.</p>
<p>Does that help?<br/>Best, Marc</p> Hi Rui,
there is a way to pre…tag:www.grasshopper3d.com,2013-02-28:2985220:Comment:7990422013-02-28T19:59:10.683ZFlorian Frankhttps://www.grasshopper3d.com/profile/FlorianFrank
<p>Hi Rui,</p>
<p>there is a way to preview your geometry. But you have to do it for each type of geom...like Point Curve Breps Surface ect. (Look at the example file)</p>
<p></p>
<p>The bake is basically also possible...look at the example file also here.</p>
<p></p>
<p>The example i've made for you shows the approach of displaying all different kinds of geometry and if you hit the bake button it will create a new block and insert it....if the block with the same name already exists it will…</p>
<p>Hi Rui,</p>
<p>there is a way to preview your geometry. But you have to do it for each type of geom...like Point Curve Breps Surface ect. (Look at the example file)</p>
<p></p>
<p>The bake is basically also possible...look at the example file also here.</p>
<p></p>
<p>The example i've made for you shows the approach of displaying all different kinds of geometry and if you hit the bake button it will create a new block and insert it....if the block with the same name already exists it will override it...this prevents from annoying errors if you make some changes and just want to update the block</p>
<p></p>
<p>Hope this helps and gives you an idea...of course this can be done in a completely different way, but all the methods and classes you might use are in the example.</p>
<p></p>
<p>Cheers FF</p>