<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TextPlus: How to label an Object using its Object name in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7052815#M12919</link>
    <description>&lt;P&gt;Hi, here's a short script that applies a textplus label to every non-textplus object in a scene. &amp;nbsp;You can use it as a starting point for what you're trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-- label everything in the scene w/ a textplus

fn label_it obj = (

	str = obj.name

	t = TextPlus size:10
	t.SetFont "Arial" 0
	t.ResetStyle()
	t.ResetString()
	t.AppendString str
	t.pos = obj.pos
	bb = nodeLocalBoundingBox obj
	t.pos.z = bb[2].z
)

allObjects = $*
for obj in allObjects do (
	
	print obj.name
	-- don't label textplus objects, that would be silly
	if (classOf obj != TextPlus) do (
		label_it obj
	)
)&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 May 2017 12:29:57 GMT</pubDate>
    <dc:creator>drew_avis</dc:creator>
    <dc:date>2017-05-01T12:29:57Z</dc:date>
    <item>
      <title>TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7014035#M12916</link>
      <description>&lt;P&gt;Is it possible to label an Object with its Object Name using&amp;nbsp;TextPlus?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have watched the TextPlus &lt;EM&gt;Set Value as Text&lt;/EM&gt;&amp;nbsp;tutorial but this only enables values from a reference Object, not its Name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have ~200 objects to label in my scene, it would be much quicker if there is a method to support this, rather than having to type out the individual object names 200 times&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 05:39:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7014035#M12916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-13T05:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7050643#M12917</link>
      <description>&lt;P&gt;Hello&amp;nbsp;@Anonymous&amp;nbsp;and welcome to the community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this thread didn't get a reply and I'm not really great at scripting I am going to move this thread to the programming forum in the hopes that you get a reply there. &amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 21:55:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7050643#M12917</guid>
      <dc:creator>Alfred.DeFlaminis</dc:creator>
      <dc:date>2017-04-28T21:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7051166#M12918</link>
      <description>&lt;P&gt;no worries&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930751"&gt;@Alfred.DeFlaminis&lt;/a&gt;, cheers&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 13:16:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7051166#M12918</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-29T13:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7052815#M12919</link>
      <description>&lt;P&gt;Hi, here's a short script that applies a textplus label to every non-textplus object in a scene. &amp;nbsp;You can use it as a starting point for what you're trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-- label everything in the scene w/ a textplus

fn label_it obj = (

	str = obj.name

	t = TextPlus size:10
	t.SetFont "Arial" 0
	t.ResetStyle()
	t.ResetString()
	t.AppendString str
	t.pos = obj.pos
	bb = nodeLocalBoundingBox obj
	t.pos.z = bb[2].z
)

allObjects = $*
for obj in allObjects do (
	
	print obj.name
	-- don't label textplus objects, that would be silly
	if (classOf obj != TextPlus) do (
		label_it obj
	)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2017 12:29:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7052815#M12919</guid>
      <dc:creator>drew_avis</dc:creator>
      <dc:date>2017-05-01T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7053266#M12920</link>
      <description>&lt;P&gt;Nice one Drew, I tested it and it's great! &amp;nbsp;Does that help&amp;nbsp;@Anonymous?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you feel that this solves the issue for you&amp;nbsp;@Anonymous, please mark Drew's post as the solution. &amp;nbsp;Thanks! &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 16:48:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7053266#M12920</guid>
      <dc:creator>Alfred.DeFlaminis</dc:creator>
      <dc:date>2017-05-01T16:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054274#M12921</link>
      <description>&lt;P&gt;cheers thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1985099"&gt;@drew_avis&lt;/a&gt;&amp;nbsp;exactly&amp;nbsp;what I was after!&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 05:16:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054274#M12921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-02T05:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054276#M12922</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930751"&gt;@Alfred.DeFlaminis&lt;/a&gt;&amp;nbsp;for progressing this, as always you rock&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 05:17:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054276#M12922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-02T05:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054322#M12923</link>
      <description>&lt;P&gt;nice &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1985099"&gt;@drew_avis&lt;/a&gt;, if you don't mind, I think this is useful (just 1 bold line added)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-- label everything in the scene w/ a textplus

fn label_it obj = (

	str = obj.name

	t = TextPlus size:10
	t.SetFont "Arial" 0
	t.ResetStyle()
	t.ResetString()
	t.AppendString str
	t.pos = obj.pos
	bb = nodeLocalBoundingBox obj
	t.pos.z = bb[2].z
	&lt;STRONG&gt;t.parent = obj   -- link label to object&lt;/STRONG&gt;
)

allObjects = $*
for obj in allObjects do (
	
	print obj.name
	-- don't label textplus objects, that would be silly
	if (classOf obj != TextPlus) do (
		label_it obj
	)
)&lt;/PRE&gt;
&lt;P&gt;just so if you move the objects around, the labels go with them...&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 06:09:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7054322#M12923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-02T06:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7055367#M12924</link>
      <description>&lt;P&gt;@Anonymous, good addition - you could also put the labels on their own layer to easily show/hide. &amp;nbsp;Lots of potential for fun with this one.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 14:10:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7055367#M12924</guid>
      <dc:creator>drew_avis</dc:creator>
      <dc:date>2017-05-02T14:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: TextPlus: How to label an Object using its Object name</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7055962#M12925</link>
      <description>&lt;P&gt;Happy to do whatever I can&amp;nbsp;@Anonymous. &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &amp;nbsp;Thanks for the kind words. &amp;nbsp; Good idea here&amp;nbsp;@Anonymous&amp;nbsp;and thank you very much&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1985099"&gt;@drew_avis&lt;/a&gt;&amp;nbsp;for your awesome code. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a small addition as well, adding a tiny bit of extrude to the lettering so when zoomed out the faces don't overlap. &amp;nbsp;(Default setting of textplus.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-- label everything in the scene w/ a textplus

fn label_it obj = (

	str = obj.name

	t = TextPlus size:10
	t.SetFont "Arial" 0
	t.ResetStyle()
	t.ResetString()
	t.AppendString str
	t.pos = obj.pos
	bb = nodeLocalBoundingBox obj
	t.pos.z = bb[2].z
	t.parent = obj   -- link label to object
        t.extrudeamount = 0.025
)

allObjects = $*
for obj in allObjects do (
	
	print obj.name
	-- don't label textplus objects, that would be silly
	if (classOf obj != TextPlus) do (
		label_it obj
	)
)
&lt;/PRE&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 17:01:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/textplus-how-to-label-an-object-using-its-object-name/m-p/7055962#M12925</guid>
      <dc:creator>Alfred.DeFlaminis</dc:creator>
      <dc:date>2017-05-02T17:01:01Z</dc:date>
    </item>
  </channel>
</rss>

