Author Topic: Custom Fields including engineering units  (Read 264 times)

0 Members and 1 Guest are viewing this topic.

PiP

  • Jr. Member
  • **
  • Posts: 10
Custom Fields including engineering units
« on: July 11, 2018, 01:35:26 AM »
Hello,

I am using the following formula to get the [x,y] position of the text associated with a connector:

=ROUND((BeginX+Controls.TextPosition),0)&","&ROUND((BeginY+Controls.TextPosition.Y),0)

issue being the result also returning the engineering units (which I don't want). 

Is there a simple way of omitting the engineering units?

Regards,

PiP

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3330
  • Ideas Visio-lized into solutions
Re: Custom Fields including engineering units
« Reply #1 on: July 11, 2018, 10:26:17 AM »
Check this link...scroll to the format function.
Visio 2019 Pro

PiP

  • Jr. Member
  • **
  • Posts: 10
Re: Custom Fields including engineering units
« Reply #2 on: July 11, 2018, 05:22:53 PM »
Thanks for that apperdude.  I was playing around with this a bit more last night and think I've got more problems that I originally considered.  I will see if that is fixed by the FORMAT() function as suggested above.

Ultimately I am trying to convert a number (integer) into an alpha character using the CHAR() function.  That doesn't seem to work with the (dimensioned) data I can obtain from the likes of BeginX etc.

Is there a way to convert a dimensioned variable to just an integer or float (without VB)?

Regards

PiP

PiP

  • Jr. Member
  • **
  • Posts: 10
Re: Custom Fields including engineering units
« Reply #3 on: July 11, 2018, 05:40:11 PM »
Looks like FORMAT(x, "0") fixes.  Still have some homework to understand what is occuring behind the scenes. 

Thanks

PiP