TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

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

VBA - Room Name Macro
Read 4321 times
* November 10, 2009, 04:59:27 AM
Here's a macro I created a while ago and use every day (and posted in the old forum a couple of years ago). Basically, it pastes room names at the cursor location from a list box. Obviously, you can use other text than room names. There are two files; the macro itself and the text file (room.txt). I have the macro and the text file in the default MACROS folder. You may have to change the path with in the macro as I have a ver 9 setup. Also, there are options for font and text height but, you have to change them from the VBA editor. Hope someone can get some use out of it.


[attachment deleted by admin]


* November 11, 2009, 01:41:41 PM
Hi Enzo
Many thanks fort his tool.
It will spare me a lot of typing.
In my case I had to change
AppActivate "TurboCAD"
AppActivate "TurboCAD Professional"

But then it works fine.

I tried to add a feature to choose the Text Style , but had no success.
I want to choose a text style which I created in the Style manager.
Does anybody know the right syntax for that?

Any help is appreciated

« Last Edit: November 11, 2009, 02:13:23 PM by ibruethsch »


March 19, 2012, 01:38:23 PM

I download it and unzip it, and got two files, Labe.txt and roomname.tcm.

I tried to open the tcm file with the macro palet, but this is proberly wrong.

How shall I use them?

Kai Sannes

Kai Sannes, DAKnor. Norwegain TurboCAD seller and instructor.
Laptop Acer Aspire VN7-793G
GeForce GTX1060, 6Gb,Core i7-7700HQ,16GB RAM,256GB PCIe SSD,1TB HDD,W10 Home
17.3" Full HD matt

* March 20, 2012, 11:17:48 PM
Hi Kai,

you can't open the macro in the macrorecorder palette because this macro was written for the vba environment which was dropped by IMSI in TC 11. To rewrite the code for use with vbscript or in the
macro palette is not a trivial task- the original macro uses a listbox which is filled with the content of
label.txt where You can change the entries for Your drawing. List or Combo boxes are not supported by
the macro recorder or vbs. One possibility to run the code would be to rewrite the code for use with Visual Basic and get an exe or dll file or to use the scripting language together with a html document.

Attached is a pdf file with the original code of the tcm. macro



* March 21, 2012, 04:31:46 AM
I use this tool often.
I made an .exe with VB6.
I use full path to the room.txt
D:\Program Files (x86)\IMSIDesign\TCWP18\Macros\meine\room.txt

You have to create the full path before using this .exe
Please have a try. If it do not run on your system, don´t blame me. Vb6 is very old.

best regards



* March 21, 2012, 05:12:59 AM
Hi Kai
in case you use TC18pro you can have access to the rommname.exe in the menue using the rubyconsole.
in the roomname.rb I also use full path. (D:\Program Files (x86)\IMSIDesign\TCWP18\Macros\vb\roomname\roomname2011.exe)
Is easy to change in an texteditor.
unzip and copy to ...\tcwp18\progam\rubyscript
You need the win32ole in the same folder. It is included in the .zip-file.
best regrads