# Decimal zeros missing (PointCoordinate function)

**URL:** <https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680>\
**Category:** Rhino for Windows\
**Tags:** windows, text, pointcoordinate, linear-resolution\
**Created:** [October 7, 2025, 10:46am UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680 "2025-10-07T10:46:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.urbanski](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/s.urbanski/32/702138_2.png) [@s.urbanski](https://discourse.mcneel.com/u/s.urbanski)\
**Post date:** [October 7, 2025, 10:46am UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/1 "2025-10-07T10:46:25Z")

</div>

Hello,

I have a problem with missing zeroes in the text field.

I want to show the points heights in the drawings. I have points and I used \<PointCoordinate(“Block”,“Z”)\> command to get their height.

The only problem I have is that some points do not show the expected 0 at the end. As shown in the image below, I want it to be 8.10 and 8.00.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/9/5/a95718232341e656343f279902d2aca95260bdbf.png)

I checked annotation styles setting, but that one seems to be ok:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/d/5/1d55a202f92730b0aefa15977efed420328aec76.png)

I would be grateful for help with that problem.

---

<div class="post-metadata">

**Author:** ![Japhy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/japhy/32/487647_2.png) [@Japhy](https://discourse.mcneel.com/u/Japhy)\
**Post date:** [October 7, 2025, 1:24pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/2 "2025-10-07T13:24:30Z")

</div>

Hi S. Urbanski,

I’m seeing this too, we should also be able to directly format the value as well.

@wim might know the solution here. I haven’t gotten either to work as of yet.

> **[Text fields | Rhino 3-D modeling](https://docs.mcneel.com/rhino/8/help/en-us/information/text_fields.htm)**
>
> Text fields are a feature for text and leaders. Text fields are formulas that are evaluated while Rhino is running and the result is displayed in the text. All text fields are in the syntax of %\<field and options\>%. When a formula cannot be...

---

<div class="post-metadata">

**Author:** ![Juan\_Gallo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/juan_gallo/32/542095_2.png) [@Juan\_Gallo](https://discourse.mcneel.com/u/Juan_Gallo)\
**Post date:** [October 7, 2025, 1:42pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/3 "2025-10-07T13:42:22Z")

</div>

i dont understand you you are getting point coordinate from block. can you share the file please?

---

<div class="post-metadata">

**Author:** ![Japhy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/japhy/32/487647_2.png) [@Japhy](https://discourse.mcneel.com/u/Japhy)\
**Post date:** [October 7, 2025, 2:03pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/4 "2025-10-07T14:03:24Z")

</div>

Here’s the file i’m working with

[BlockTextField.3dm](https://discourse.mcneel.com/uploads/short-url/nsE5n5pyOXrUYZZIwp1vqdXL7SF.3dm) (61.6 KB)

---

<div class="post-metadata">

**Author:** ![Trav](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/trav/32/681734_2.png) [@Trav](https://discourse.mcneel.com/u/Trav)\
**Post date:** [October 7, 2025, 2:07pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/5 "2025-10-07T14:07:11Z")

</div>

PointCoordinate returns a string so you’ll have to cast it to a float first, round it, and then format it to show 2 decimals places. This should work, assuming only 1 axis.

%\<‘{:.2f}’.format(round(float(PointCoordinate(“Block”,“Z”)), 1))\>%

---

<div class="post-metadata">

**Author:** ![Trav](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/trav/32/681734_2.png) [@Trav](https://discourse.mcneel.com/u/Trav)\
**Post date:** [October 7, 2025, 2:11pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/6 "2025-10-07T14:11:12Z")

</div>

I added the “Block” trick during a service release of v8. There’s currently no UI for it, but if you create a Point Coordinate object and then replace the object ID with the word Block and then convert the text into a block instance the text field parser will return the blocks transformed location. I hope to get the UI in place for v9. [https://mcneel.myjetbrains.com/youtrack/issue/RH-68819](https://mcneel.myjetbrains.com/youtrack/issue/RH-68819)

---

<div class="post-metadata">

**Author:** ![ivan.galik](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivan.galik/32/731821_2.png) [@ivan.galik](https://discourse.mcneel.com/u/ivan.galik)\
**Post date:** [October 7, 2025, 7:52pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/7 "2025-10-07T19:52:25Z")

</div>

it does not seem to work. i want to ask if its possible to perform some kind of math with it? i want to add 200 + Z for example.

---

<div class="post-metadata">

**Author:** ![ivan.galik](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivan.galik/32/731821_2.png) [@ivan.galik](https://discourse.mcneel.com/u/ivan.galik)\
**Post date:** [October 7, 2025, 7:54pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/8 "2025-10-07T19:54:30Z")

</div>

i think this trick could be extended into proper function. it is very useful. i can think of returning volume for solids inside block, areas of closed curve inside block etc.

---

<div class="post-metadata">

**Author:** ![ivan.galik](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ivan.galik/32/731821_2.png) [@ivan.galik](https://discourse.mcneel.com/u/ivan.galik)\
**Post date:** [October 7, 2025, 8:11pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/9 "2025-10-07T20:11:52Z")

</div>

> [@Trav](#):
>
> {:.2f}

ok this works:

%\<“{:.3f}”.format(200 + float(PointCoordinate(“Block”,“Z”)))\>%

it is now possible to use it as elevation annotation

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/a/3/6a33ae4711add31daf5e7da4a0a2cd264b0d24bc.png)

---

<div class="post-metadata">

**Author:** ![Trav](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/trav/32/681734_2.png) [@Trav](https://discourse.mcneel.com/u/Trav)\
**Post date:** [October 7, 2025, 10:11pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/10 "2025-10-07T22:11:24Z")

</div>

Rhino 7 introduced Python parsing of TextFields as Japhy posted above. There are several ways to lightly extend the returned results based on your needs. Most Math and String functions are supported, but more advanced python execution is ignored. eg no virus potential in a textfield.

> **[Text fields | Rhino 3-D modeling](https://docs.mcneel.com/rhino/8/help/en-us/information/text_fields.htm)**
>
> Text fields are a feature for text and leaders. Text fields are formulas that are evaluated while Rhino is running and the result is displayed in the text. All text fields are in the syntax of %\<field and options\>%. When a formula cannot be...

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [October 13, 2025, 1:19pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/11 "2025-10-13T13:19:18Z")

</div>

Hi Ivan -

> [@ivan.galik](#):
>
> i can think of returning volume for solids inside block, areas of closed curve inside block etc.

The issue with blocks is on the list as [RH-55286](https://mcneel.myjetbrains.com/youtrack/issue/RH-55286) Text Field - Cannot select a block to retrieve attributes  
-wim

---

<div class="post-metadata">

**Author:** ![brian](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/brian/32/504171_2.png) [@brian](https://discourse.mcneel.com/u/brian)\
**Post date:** [March 17, 2026, 8:36pm UTC](https://discourse.mcneel.com/t/decimal-zeros-missing-pointcoordinate-function/210680/12 "2026-03-17T20:36:09Z")

</div>

[RH-68819](https://mcneel.myjetbrains.com/youtrack/issue/RH-68819) is fixed in Rhino [WIP](https://discourse.mcneel.com/t/welcome-to-serengeti/9612)
