Hi @Tig,
I am looking to download version 3.1 that will work with SU 2016. (I know it's well behind the current SU version. It's what I have...)
Do you have a link for V3.1?
Or a trick to download it?
Many thanks,
Miner_jeff
Hi @Tig,
I am looking to download version 3.1 that will work with SU 2016. (I know it's well behind the current SU version. It's what I have...)
Do you have a link for V3.1?
Or a trick to download it?
Many thanks,
Miner_jeff
Hello,
I have developed a workflow to set layer colours imported from cad.
It has a few steps.
I can share the code if anyone is interested. It does require that you have access to run AUTOCAD & .LSP routines as well as MS Excel VBA.
Cheers,
Miner_jeff
Hi Folks,
If you need to create a sequence of layers with text and numbers with specific colours I have shared a means to create the text file easily for use with this wonderful ruby of TIG's.
It can be used to verify the colour of RGB values too by colouring the cell to RGB values specified.
I used MS excel and VBA. It can be found here http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=63894
Cheers,
Miner_jeff
Hello fellow Sketchup users!
This is my first Topic Post.
I would like to thank all the contributors on this site who have been gracious enough to share ruby code with all the users. I would not be where I am without many of the posts that are shared here. I hope to someday repay my debt to this community by perhaps sharing some of my experience and knowledge. Sketchup has really become a useful tool with all the functionality additions made possible by ruby scripting that the community has put forward for low or no cost.
So today I am offering to the community a small program I have written in VBA to facilitate the creation of layers. I am sure there is a way to do this in ruby. However ruby code is not my strength. I can barely hack ruby code by others. I by no means am a trained programmer. It has been a long time since I was in a formal class room setting to learn a programming language. The last language I was formally introduced to was Fortran77.
I can hack my way through VBA using help files and programs written and shared by others. My code is not meant to be as efficient as possible but it works(at least for me). I share it here for others to use or change for their own purposes. I ask only that my code is credited in future iterations.
So what does the code do? Well I work with many layers often sequentially numbered or that follow a pattern of ascii characters and numbers. An example might be "3D-Elevation-1000", "3D-Elevation-1010" or "layer-01"-"Layer-02"... The sequence may continue to 100 layers or more. It varies from project to project. Creating the layers manually in Sketchup was too painful. Never mind the colours that Sketchup assigns. Changing the colour of many layers is very slow to do so one by one.
TIG has been gracious enough to share with us [Plugin] Layersfromlist.rb It creates layers from a text file that has the layer name and the layer colour defined by the RGB components. Layerstolist.rb does the reverse. It creates a text file containing the layers and their currently assigned colours.
Editing many layer colours in a row can be tedious and a slow process. This program can assist with that task and opens the door to much more.
This excel worksheet formula will generate ramp colours where you begin with a particular colour and ramp through a number a steps (user input #steps) to another colour that is also user specified. This colour ramp delivers the transitional RGB values for use with a layer list.The layer list is imported into Excel. The transition is calculated in a straight linear fashion.
I work and play with elevation contours and point cloud data generated from LiDAR scanning a fair bit. This tool comes in handy to transition colours by elevation gradually quickly. I also find it usefule to highlight a particular elevation layer in a snap by changing the layer of interest to something bright and reduce other elevations to less striking, say for intermediate contours for maps. You can there is no way that you can change a the selected layers colours en masse by clicking and highlighting a group then pick a new colour for the group. (It would be a nice feature though - Ruby plugin?) So a bit of the sequence... 1)Create a new layers list (column in Excel) with an accompanying list of R,G,B only changing the the colours. 2)save the list into a properly formated text file. 3)Load the new colour scheme using TIG's plugin and you have all the layers re-coloured in an instant! Don't like the colour(s)? change them again quickly with a revision in Excel and save the new scheme as a text file and reload it with the plugin.
If ramping from one colour to another is too simple, you can build a multicolour ramp by repeating the sequence to include multiple colours with custom ramps between each as you wish. Examples could include Blue changing to green then yellow and red. You have control of the ramp rate so if you have limited number of elevations you can transition the elevation colours quickly. Totally up to the user.
If creating your own ramps from colour to colour is not exciting enough. I have code that will allow you use to 2 websites that generate multi colour ramps based on your input. Basically copy the Hex codes from the webpage and macros I wrotewill convert the clipboard data to RGB values that you in tern copy-paste to your layer names excel sheet. See the screen grabs for instructions on how to proceed.
http://www.perbang.dk/rgbgradient/ is one site I use. Another is http://meyerweb.com/eric/tools/color-blend/#:::hex
(I have no affiliations with either of these sites.)
I have attached a few screen grabs from my excel session for a visual of what I am talking about. If you are interested you can download the VBA code (as text file) and create a MS excel workbook to run the VBA macro. Also attached is the workbook (.xlsx) I used to run the excel formula (a no code). You'll have to add the code to a vba module in the excel file and save a macro enabled file (.xlsm).
Should someone wish to have the excel file complete with the macro ready to operate, I can post that as well. Just post a request here or PM me.
The code is in the text file.
My code is not perfect by any means, I am not a programmer but it works for the limited testing I have done on my Windows PC. I have no intention of becoming a programmer either. Others can port the code to other programming languages if they wish. I have only used it in english on a PC. I am unable to support MAC users.
I can offer some limited support in either english or français. Post questions here in this topic.
I am looking for some beta test volunteers. If you wish to assist with some positive feedback about my first post or the content the I am sharing I would welcome it.
No warranties are expressed or implied. Liability is limited to what you are paying for this software - zero dollars. (Is that the creative commons license?)
Cheers,
Miner_Jeff
Hi Tig,
You are correct. I will have to investigate Inkscape a little further as to why no text objects are being saved with the saveas DXF export.
Do you get a bug splat if you attempt to use importDXFtext and there are no text entities in the DXF?
Cheers,
Miner_jeff
Hello,
I realize this is a an old thread. Anyone else having issues trying to use this with Sketchup make 2015?
I get a crash shortly after invoking the script in the console, goes straight to bugsplat reporting.
Thanks Tig for all your selflessness in sharing of your ruby programming skills.
Cheers,
Miner_jeff
Well done Sir!
Very useful Ruby indeed!
Thank you for the updates and additional feature programming.
Cheers!
Miner_jeff
Hi TIG,
After some testing, it appears that I have a weird issue with Notepad++ [under investigation!]
Using plain Notepad to make the Layers.txt file, the plugin results are as expected.
Nice work again!
Many thanks,
Miner_Jeff
Q: How do you sink a 1000 m mine shaft?
A: Blast one round at a time.
Hi Folks,
I went through a similar process recently. Had a LiDAR point cloud with over 33M points. Ended up using CloudCompare's dxf output to decimate the data to evenly spaced horizontal contours. It's a recent feature addition. Subsequently used Jim's [Plugin] FreeDXF Importer http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=22199%26amp;start=15
to get the dxf file into Sketchup. Each contour is created with an individual layer which is kinda messy in Sketchup, with some elbow grease the contours can be reallocated to layers by elevation.
http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=20633%26amp;start=15
Worth a look for anyone trying to work LiDAR data.
Creating and coloring numerous layers is easily handled by TIG's [Plugin] TIG-LayersFromList
http://sketchucation.com/forums/viewtopic.php?p=566286#p566286
Cheers,
Miner_Jeff
Lovely Plugin!
Still valid and useful in 2015!
Your generosity is appreciated!
Great for connecting x,y,z coordinates exported from Excel and plotted using the Points Cloud import function. http://sketchucation.com/forums/viewtopic.php?p=253563#p253563
I use it for path center line slopes.
Keep up the good work!
Cheers!
Miner_Jeff
Hello,
Not sure if anyone else is experiencing this or not.
I have not tested V1.1 with Windows 8 yet only Win 7.
Version 1.0 worked with Win 7. Layers were created as described in the instructions using a [TAB] delimiter. (Sketchup pro 2015, Win 7)
V1.0 with Sketchup Pro, Win 8 would not work. Layers names would show as Rich describes
"Layer01 255,0,128" and random color.
V1.1 with Sketchup Pro, Win 7 gives layers named "Layer01:255,0,128" with random color
V1.1 with Sketchup Pro, Win 8 - not tested yet.
Cheers,
Miner_Jeff
TIG:
Thank you so very much for the quick response and code!
Much appreciated!!
Cheers!
Miner_Jeff
Hello!
Thanks for sharing this script. The ruby code gurus and their shared code are what make Sketchup and this site so vibrant.
I realize it is several years old now.
Any chance this could be changed/morphed to do the reverse? I used it to export the layer names and colors to a file. Now wish to import the layer list (creating layers in a new file ) and/or change layer colors to the rgb values in the file.
Could also be useful for en masse layer color changes. I see it being useful to highlight a particular layer and setting colors on others to shades of grey and switching back to full color. I could see the list being changed programmatically using Excel VBA. I can hack my way through the VBA but ruby not so much. I would be willing to post the VBA code to the forum as a small repayment to the Sketchup community for all the free code and advice received over the years.
Perhaps this deserves its own thread?
Thanks & Cheers!
Miner_Jeff