Visio Guy

Visio Discussions => Shapes & Templates => Topic started by: PiP on July 11, 2018, 06:35:26 AM

Title: Custom Fields including engineering units
Post by: PiP on July 11, 2018, 06: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
Title: Re: Custom Fields including engineering units
Post by: wapperdude on July 11, 2018, 03:26:17 PM
Check this link...scroll to the format function.
Title: Re: Custom Fields including engineering units
Post by: PiP on July 11, 2018, 10: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
Title: Re: Custom Fields including engineering units
Post by: PiP on July 11, 2018, 10:40:11 PM
Looks like FORMAT(x, "0") fixes.  Still have some homework to understand what is occuring behind the scenes. 

Thanks

PiP