News:

When replying to a specific statement be sure to quote the previous post.

Main Menu

Blocks in Palette

Started by Marek, January 15, 2014, 07:06:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marek

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
Marek

TC Pro 2016, TC Pro 2018, TC Plat 2019,TC Plat 2020,TC Plat 2021,TC Plat 2022,TC Plat 2023,TC Plat 2024, TC Plat 2025
Laptop Asus i7 6500U, dual-core 2,50GHz, NVIDIA GeForce GTX 950M, RAM 12 GB, SSD 480GB
Windows 10 64 bit

John R

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.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Marek

#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
Marek

TC Pro 2016, TC Pro 2018, TC Plat 2019,TC Plat 2020,TC Plat 2021,TC Plat 2022,TC Plat 2023,TC Plat 2024, TC Plat 2025
Laptop Asus i7 6500U, dual-core 2,50GHz, NVIDIA GeForce GTX 950M, RAM 12 GB, SSD 480GB
Windows 10 64 bit