I am trying to calculate the width of a string defined by csname.
The MWE is here
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{calc}
\def\EllipseDegrees{120}
\def\EllipseOuterRadious{4}
\def\EllipseInnerRadious{3}
\newsavebox\mybox
\newlength{\mylengtho}
\newlength{\mylengtht}
\begin{document}
\begin{tikzpicture}
\tikzset{
partial ellipse/.style args={#1:#2:#3}{
insert path={+ (#1:#3) arc (#1:#2:#3)}
}
}
\draw (0,0) circle (3);
\draw (0,0)
[partial ellipse={180+\EllipseDegrees/2}:{180-\EllipseDegrees/2}:\EllipseOuterRadious cm and \EllipseInnerRadious cm];
\pgfmathsetmacro\stepslines{5}
\pgfmathsetmacro\degsteplines{\EllipseDegrees/\stepslines}
\foreach \ellipsetext [count=\i from 1] in {First Value, Second Value, Third Value, Fourth value, Fifth value}{
\global\expandafter\let\csname Item\i\endcsname\ellipsetext
\xdef\myt{\csname LeftItem\i\endcsname}
\savebox\mybox{\myt}
\pgfmathsetmacro\myw{\wd\mybox}
\node at (5,0) {myw=\myw};
\global\expandafter\let\csname Item\i Width\endcsname\myw
}
\foreach \n in {1,...,5} {
\xdef\curdeg{180-\EllipseDegrees/2+(\n-1)*\degsteplines}
\pgfmathsetmacro\curdegfixed{\curdeg+(\degsteplines/2)}
\savebox\mybox{\fontsize{10}{12}\selectfont\expandafter\csname Item\n\endcsname}
\settowidth{\mylengtho}{\expandafter\widthof{\mybox}}
\settowidth{\mylengtht}{\usebox{\mybox}}
\global\expandafter\let\csname mylengthone\endcsname\mylengtht
\global\expandafter\let\csname mywidthof\endcsname\mylengtho
\pgfmathsetmacro\EllipseOuterRadiousfixed{\EllipseOuterRadious}
\pgfmathsetmacro\EllipseInnerRadiousfixed{\EllipseInnerRadious}
\node[rotate=180+\curdegfixed] at ($(0,0)+
({\EllipseOuterRadiousfixed*cos(\curdegfixed)},{\EllipseInnerRadiousfixed*sin(\curdegfixed)})$)
{%
\fontsize{10}{12}\selectfont \csname Item\n\endcsname
};
}
\node at (5,1) {thewdmybox=\the\wd\mybox};
\node at (5,-1) {themylength=\the\mylengtho};
\node at (5,2) {mywidthof=\expandafter\the\csname mywidthof\endcsname};
\node at (5,3) {mywidthof=\expandafter\the\csname mylengthone\endcsname};
\end{tikzpicture}
\end{document}
The point is to add text radical (next to a circle) in elliptical way and alligned.
The result pdf is this:
I have done a part of the job described but I need length of every text of the list (kept with '\csname') to add the distances and correct my variables.
As you can see... next to the diagram I print every try made and all are zero!
Any idea?

widthfunction for getting the width of text. – cfr Aug 21 '17 at 13:00\pgfmathwidth{}. The version in an expression iswidth(). – cfr Aug 21 '17 at 13:08