lenght of a curve

 From:  Michael Gibson
5205.6 In reply to 5205.5 
Hi nos,

> But it seams not to work cause of the moi.get.ui part. So how should it look
> like? I tried the following but it don't doing anything:

The moi.ui.getUIPanel() part returns back a variable that you would then use as the place to insert HTML into.

Right now you're calling it and not actually doing anything with the returned variable, you'd need to do something more like:

var panel = moi.ui.getUIPanel( '...' );

panel.document.body.insertAdjacentHTML( .... )

> And instead of the "CommandBar.htm" what would be the name of the ui-block which
> displays the element name, style, and dimension?

That's inside of the Side pane - that can be retrieved by:

Then the part that displays the object properties is an element nested a fair ways down inside the side pane, the container of it has id="PropertiesPanel".

It will be kind of difficult to make a properly behaving readout in there though with just some shortcut key code doing it, because if you display the value by modifying the HTML your modifications are going to be stuck there all the time after that, and having old values stick there could be bad since it could pretty easily lead to you thinking that some old value was actually the length of the current selection. The "CurveLengthBeingDrawn" script basically avoided that problem because it put its stuff into the command UI document, which is a document that is created fresh when a command is run and destroyed when the command exits (it holds all the UI specific to each individual command), so it sort of automatically clears out. The place you're wanting to add stuff to only gets hidden and shown, not actually cleared out and so you'll have the problem of whatever you put in there sticking around.

- Michael