Print at Dec 15, 2025, 4:00:41 PM View all posts in this thread on one page
Posted by Ferraro at Feb 16, 2015, 8:00:29 PM
Text name only in 2D view
Is there a way to display the catalog name only in the plan view? I have run into a situation where the top down view is undesirable, and just the catalog name of the object is more appropriate. I thought about using a plan icon image, but this does not produce the desired vector text output I need in the SVG. Any ideas?

Posted by Ferraro at Feb 19, 2015, 10:23:16 PM
Re: Text name only in 2D view
If anyone is interested, I tried using an SVG file as the planIcon, but it does not work. I get that little red X. I guess there is no quick fix inside SH :(

Posted by clanmills at Feb 20, 2015, 8:11:26 PM
Re: Text name only in 2D view
I don't know the answer, however here are a couple of ideas:

Changing SH3D code
The method paintIcon() in PlanComponent.java appears to generate an image which is used as a "proxy" for an item of furniture. Perhaps you could rewrite that method to create a little text label which displays the name of the item

PostProcessing the SVG
I've exported an SVG file and it consists of vector graphics and <image .../> tags which I believe are "proxy" images. I removed the images with this:

$ cat SGx.svg | xmllint --format --recover - | sed 's#<image.*/>##g' > SGy.svg

I suspect the <image ../> tag is identical for every instance of the same item of furniture. A script could be devised to identify every <image ../> and replace it with a graphical/SVG text label unique for that <image ../>

Posted by clanmills at Feb 22, 2015, 10:24:08 PM
biggrin   Re: Text name only in 2D view
I've solved this! I've been updating the model of my home and noticed in the "Modify Furniture" Dialog that there's a check box "Display name in Plan". You should enable that on every item of furniture, the use my xmllint magic to remove the furniture "proxy". Et voila!

It would be easy to create a plugin to automate this and set/reset the state of "Display name in Plan". Windows can install xmllint from https://code.google.com/p/xmllint/downloads/d...lint.exe&can=2&q=

Posted by Ferraro at Feb 24, 2015, 10:24:35 PM
Re: Text name only in 2D view
Thanks for your suggestions clanmills, you gave me some good ideas. I am thinking "Display name in plan" should be enabled from the furniture library properties file. Going to see how hard that is to rework. Then I can just load a transparent png for the planIcon.