ScriptSpot

Script

LiveMeasure

By miauu · 2011-09-22

Version
1
Version requirement
3ds max 2009 and UP
Date updated
2019-03-19
Votes
14
Description

Measure and show edges length, segments length and faces area in real time. Work with Splines, Editable_Poly and  Editable_mesh objects and Edit_Poly modifier.
--        In Polygon/Element sub-object level will show the selected faces area in generic units only.
--        In Edge/Border sub-object level will show the length of selected edges in user defined units.
--        In vertex sub-object level, when vertex is move will show the length of edges that is common for the selected vertex.
--        If top sub-object level is active will show the dimension of the selected object.

The edge/segment length and face area will update when the edges/segments/faces are scaled or when the vertex is moved.

In top left corner of the viewport will be shown the total face area or total edge length.

Thanks to kilad now the script work with max2012 and up(download LiveMeasureMAX2012.ms)

Install: drag-n-drop the LiveMeasure_v1.ms in 3ds max. Go to Customize-Customize User Interface-"miauu" caegory. Assignt to a hotkey. The script work as a toggle - press the hotkey to start, press again to stop the script.

Script idea by @harumscarum.

Video on youtube

Videos
Attachments

Tags: edge, measure, face, vertex, polygon, Length, dimension, border, element, area

Comments (62)

Data location

fangzi · 2020-12-23

The data overlapped. Can the data display position be changed.

Attachments

.

miauu · 2020-12-23

Download and install livemeasure_v14_textoffset.ms

fangzi · 2021-01-15

thank you very much

sampei · 2020-04-08

this is fantastic! is there a way to increase the size of the text used to display the measurements?

sampei · 2020-04-05

working great in 2020, thanks :)

two issues with the latest version in max 2020

harumscarum · 2019-03-31

1. with the 3ds max start there is green words in the left top corner while script is not activated
2. error when run script if nothing selected

Attachments

.

miauu · 2019-03-22

wrong section

No working script!

d1myan · 2019-03-19

Very good script! but does not work in 3dsmax 2019
Runtime error: registerRedrawViewsCallback() expected function, got: undefined

.

miauu · 2019-03-19

Thank you.

Versions 1.3 are working in 3ds Max 2019.

A wonderful and very useful script!

Aniow · 2018-06-26

The script works fine and fast.
Using the script is very convenient and easy. Thanks to the author! :)

a minor fix

Hammash · 2015-08-11

Thank you for the script.

I don't know if others faced the following error: Unknown property: "count" in undefined when toggling livemeasure while in vertex sub-selection mode.

since i don't have much time i added a quick fix which is

function DrawTextOnViewports =
(
if edgeLengthArr == undefined do return 0
.
.
.
.
.

.

miauu · 2015-08-11

Hi!

Feel free to modify the script as you need. :)

Brillaint :)

Kurai · 2014-09-14

Yeeehaaaa...
Just what I wanted. Many thanks Miauu :)

I cannot write MaxScript...(wish I could)...but...would this work as an idea for a new tool?

Create rectangle + ProBoolean + Move (for punching square holes in walls).

So it's the same as Push/Pull in Sketchup. See enclosed Pic.
Just throwing it out there... for selfish reasons.

It would also combine LiveMeasure so the rectangle can be the right size.

Attachments

Thanks

Kurai · 2014-09-12

Many thanks Miauu.
I like this script better now I have the dimensions in the top left.

But, when I tried to change the colour all hell broke lose... and I kept getting error message constantly. It took me a while (cos I am new to this) but I got it back to normal and everything is working fine. Got abit of a scare though.

The colour I wanted was: (0 145 255)

I tried it with and without brackets... no comas.

I am affraid to try it again. So if you (ever) get time can you please upload a version with this colour. I can live with green, but prefer blue :)

Another question: Is there a script for getting rid of scripts? I have tried so many scripts and I am worried they might cause a problem, conflict or slow Max down.

many thanks for this simple but great little script. I makes using Max a friendlier experience :)

.

miauu · 2014-09-12

The "blue color" version is uploaded.
Now, comapae this version with the last one to see hot to change the color in the future.

To get rid of scripts is easy. You can do it manually. Usualy mas saves scripts in those folders:

- maxRoot/scripts
- maxRoot/scripts/startup

The nest 3 folders are hidden, so first you have to make them visible. I am using Windows 8.1.
In the "|\usermacros" is stored scripts (.mcr) that are used to run other scripts, placed(in most cases) in the other folders that I mentoined. So you have to delete the .mcr and the .ms/.mse files

- C:\Users\yourUSerName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\scripts

- C:\Users\yourUSerName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\scripts\startup

- C:\Users\yourUSerName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\usermacros

Deleting scripts manually will gives you control of what you will delete. Using the script to delete scripts is faster, but can causes problems(deleting scripts that you don't want to be deleted)

Many Thanks

Kurai · 2014-09-13

Thankyou for taking the time to do this. Most people would'nt.

I changed the colour to (166 229 229) Which is a ice blue... almost white.
I have enclosed screenshot. It's less distracting than the 1980's green :)

The original blue I chose was too blue (which was my fault) and you could'nt see it. I would take it off your download list incase someone uses it and it disappointed.

Thankyou for telling me how to get rid of scripts. What bothers me most is all the scripts I don't use anymore are still in the Catagory section of the Customize Menu. So when I search for a script it's crowded. I want to get rid of this if I can.

I still feel strongly that there needs to be an over-haul of the measuring system in Max. No matter how good you are at Max using Sketchup will beat any Max user hands down with modelling speed and one reason for this is the excellent measuring system that also combines 'construction guides'. The two go hand in hand. There needs to be a simple (guide + measure) tool.

Again, many thanks for your time and care :)
THIS IS A GREAT LITTLE SCRIPT :)

Sorry to be bee in your bonnet. Is there a way to round up the measurments so:
1.523m becomes 1.52 (rounded down)
1.527m becomes 1.53 (rounded up)

Attachments

.

miauu · 2014-09-14

Try livemeasure_v12_blue_color_roundnumbers.ms

Great Script

Kurai · 2014-09-11

I really like this script. It's useful for measuring objects (like doors and windows) so you can create a hole in the wall for them. It's more accurate than the other tools I've used because when you use a measuring device you never know if you have clicked the right place to get a reading between two points.
This script gives you a quick reading and rounds up the numbers... great :)

But, I wish I could change the colour of the numbers.... bright blue maybe.
I also wish there was a reading in the top left hand of the viewport that reads:

Width: 0m
Height: 0m
Depth: 0m

I think this would be good.

I know your all talented script writers but what appeals to me about scripts is the simpler they are the more I use them. Some scripts are way too complicated and make something even more complex. Menu's should be dockable and have as little features as possble to make them pleasurable. This is a perfect example of a script that keeps things simple.

.

miauu · 2014-09-11

Thanks.

Download version livemeasure_v12.ms and test it. In the top-left corner it will shows the Width, Height, Length value of the selected object.

If you want to change the color of the text do the following:
- open the livemeasure_v12.ms in notepad++, or in MaxScript Editor.
- go to line 36 and change the:


local textColor = green

to


local textColor = (color 255 0 0)

where the three numbers represent the RGB values of the color that you want
- save the script and reinstall it
- restart 3dsMax.

Dmugen · 2013-09-17

I tried the script "Measure and Select" but the numbers don't change in real time I have to press show length everytime.

So I found this one:

"Live measure" but can u make it such that the number stay. In other words I want the numbers to stay on which every edge I choose whether the egde/s are selected or not. Be able to hide and unhide the number on edge/s.

.

miauu · 2013-09-17

I don't have spare time right now.
May be, one day I will add this functionallity.
Thank you for the suggestion.

:)

I installed script and make

SIL · 2012-12-02

OK. I reinstall script, and now is all ok. Thanks.

miauu · 2012-11-12

This message shows that there are no selected objects, polygons, verts, edges etc. So, you can see that the script is active and if you don't need it you can turn it off.
But why the script starts with 3ds max? DId you place it in scripts\startup folder?

SIL · 2012-11-12

Excellent script! Thanks you!

But when 3dsmax is started - I see in active view port - "Nothing to display ! Go to Edge or Polygon sub-object level !". And then - if check and uncheck of script's button - warning is disappears.

miauu · 2011-12-29

Nema, nema. Daje po-lud stava.:)

Happy holidays!

miauu · 2011-12-29

Thank you for reporting this problem. I will fix them tommorow. :)

happy holidays!

Anubis · 2011-12-29

as we say in our country - "lud umora nema" :)
keep up the good work!

fajar · 2011-12-29

Cool man....altho you said it for max 2012 (latest one), i'd try it on max 2009 and it worked....

could you also make it work for max 9 too....please miauu.

thanks miauuu....

P/S : I Already check it on max 9 too...it work n found some error....

if no object in selection, you run the script...it cause error

http://i40.tinypic.com/2lxzhgl.jpg

also if you in sub object, no sub object selected, you run the script it cause error too

http://i43.tinypic.com/2nb9jx1.jpg

miauu · 2011-09-28

I upload the script without color boxes.:)

thank you very much!

harumscarum · 2011-09-28

now everything works fine - thank you very much!

could you please let me know which part of script should i delete to get rid of color boxes

PS/
i've got why two numbers are displayed on single selected polygon - this happens if edit poly is applied

titane357 · 2011-09-28

Thanks Miauu for all your efforts !
I have another problem ; the color bar you add don't stay under the text, it seems to be localized in relation to the screen and not to the viewport. (see attached image).
It seems that nitrous allow geometry to mask the gw.text.

Attachments

miauu · 2011-09-27

@mustafa mamdouh, the messagebox is removed.

@harumscarum you show me that in your max there is a problems, but @ruhi say that everything work fine for him. That is strange.
I don't have max2012, so I can reproduce and solve your problem. Sory. :)

Wow nice script

mustafa mamdouh · 2011-09-27

I was surprised that max is not concerning very much with dimension aspect specially when working in architectural firm and we need to model in real units.
I really hope to see something like SketchUp technique when you can draw poly-line segments with dimension input that will be revolution.
P.S: Warining message "you must select one object ...." is really annoying I hope you can fix to be displayed one time per session

harumscarum · 2011-09-27

thank you for giving us choice but actually actually green color is best for helpers )
it work now but polygon area is 2 numbers (faces?) and is hidden by shaded polygon or object

Attachments

miauu · 2011-09-27

harumscarum, i don't have any problems with position of the cage when the Edit_Poly modifier is applyed. See the attached images.
I attached the new version for max2012. There is a 4 colored butons that will change the color of the text, displayed on the screen.
Test it and tell me if there are problems. If no problems occure I will upload the script and name it for max2012.
:)

Attachments

ruhl · 2011-09-27

Thanks a lot!!! Now everything work perfectly.

harumscarum · 2011-09-27

yeah, just object dimensions not working with some modifiers. but it is not very important i suppose

here is image of wrong dimensions position attached.

and i agree with you that text is much more readable with black (or maybe semitransparent?) rectangular

Attachments

miauu · 2011-09-27

Thanks!
I will remove the black rectangles. I put them just to make text more readable.
Can you post an image of wron position of the obj dimension lines?
About you previous post - the problem with applyed modifiers - in the image that you post what you trying to show with the script - obj dimension or something else?

harumscarum · 2011-09-27

not working again... black rectangles

and one more bug - object dimensions shown in wrong position if EditPoly is applied

miauu · 2011-09-27

kilad, thank you very much! About this problem: The black rectangle drawed in front of the text etc

can someone test the attached script. I swap theposition of writing the text and the rectangle. In the original script first the rectangle is drawed, then the text on top of it. In the attached script first the text is drawed then the rectangle.

Note that in max2009 this script will display only the black rectangle.

 

harumscarum, the script work with editable_poly, editable_mesh, spline objects and with object that have edit_poly modifier on top of the stack. I will try to add support for other modifiers. :)

 

Attachments

harumscarum · 2011-09-27

thanks! version from kilad is working, but still crashing if some modifier (cap holes, uvw map, etc) is applied.

Attachments

miauu · 2011-09-26

Sory guys. :(

miauu · 2011-09-26

This script have a new name - "Live Measure for max2012". You have to assign a hotkey(or a toolbar button) to start it.

ruhl · 2011-09-26

:( X again.

miauu · 2011-09-26

Can someone with max2012 test the attachment?

I folowed the kilad advice.
:)

Attachments

titane357 · 2011-09-26

sorry, install macro, run the macro and nothing happens....

Michele71 · 2011-09-26

Very nice and helpful! :)

kilad · 2011-09-26

Beause of the nitrous viewports you must put it in a redrawviews callback:

unregisterRedrawViewsCallback GWStuff
fn GWStuff =
(
print (gw.transPoint [0,0,0])
)
registerRedrawViewsCallback GWStuff

miauu · 2011-09-26

So, gw.TransPoint, gw.hTransPoint and gw.wTransPoin are broken in max2012 and max design 2012.

miauu · 2011-09-26

Can you check this:


gw.hTransPoint [0,0,0]

and this


gw.wTransPoint [0,0,0]

and tell me what they return - undefined or a point3 value.

:)

ruhl · 2011-09-26

gw.hTransPoint [0,0,0] is undefined

and gw.wTransPoint [0,0,0] undefined :(

miauu · 2011-09-26

Max version?

ruhl · 2011-09-26

max is 2012.

ruhl · 2011-09-26

"unknown property: "x" in undefined"
The same situation is here.

miauu · 2011-09-23

Can you execute this:


gw.TransPoint [0,0,0]

and tell me what is the result ih tne listener?
I think that "gw.TransPoint" does not work in max design 2012, but I can't be sure. If the returned result is not a point3 value then I.m right.

titane357 · 2011-09-23

you're right : undefined

miauu · 2011-09-23

Thanks. :)
I will check maxdesign 2012 maxscript reference and will try to find a solution.:)

titane357 · 2011-09-23

cool

titane357 · 2011-09-23

Looks great, but maxdesign 2012 win7 don't like it...
"unknown property: "x" in undefined"
line 226 "txtRect = (box2 (posInScreen.x) (posInScreen.y-17) 50 16)"

titane357 · 2011-09-23

I make a box, convert to epoly, select one edge, run the script.
Attached listener error text.

Attachments