TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

Blocks in Palette
Read 1856 times
* January 15, 2014, 07:06:02 AM
I attached a small script for TurboCAD Pro 20, which give possibility reading blocks, which are in Blocks Palette in active drawing and saving them to *.txt file. If we want, we can delete from script line: " puts "#{p}" " and then blocks will not be visible in Ruby Console window ( it will be a little faster).
Marek
« Last Edit: January 15, 2014, 09:10:40 AM by Marek »

Logged
Marek

TurboCAD Pro 2016, TurboCAD Pro 2017
Laptop Asus i7 6500U, dual-core 2,50GHz, NVIDIA GeForce GTX 950M, RAM 12 GB, SSD 480GB
Windows 10 64 bit


* January 15, 2014, 02:28:18 PM
#1
This worked. It didn't at first when I initially loaded it into the console. After restarting the program it worked. It asked to create a *.txt file and it listed the amount and names of all the Blocks (it looks to be in creation order). I'm sure people will find this script to be helpful.

Logged
John R.

V17—V21, 2015, 2016, 2017
Designer, Deluxe, Expert, Basic, Platinum
RedSDK enabled
Windows 10, 64-bit


* January 17, 2014, 03:46:46 AM
#2
Hi John
Thank you for checking and review. I attached a version,  which in a txt file shows the blocks twice - first like as they are in Blocks Palette, and the second time in alphabetical order.
Marek
« Last Edit: January 19, 2014, 05:25:28 AM by Marek »

Logged
Marek

TurboCAD Pro 2016, TurboCAD Pro 2017
Laptop Asus i7 6500U, dual-core 2,50GHz, NVIDIA GeForce GTX 950M, RAM 12 GB, SSD 480GB
Windows 10 64 bit