# Create macro for insertion of inkscape figure with width as a variable

To input figures directly from Inkscape I write this in a figure environment

\centering
\def\svgwidth{0.5\columnwidth}
\input{name.pdf_tex}


However, I would like to be able to just use a macro instead where the desired width is a variable, but I'm not sure how to do this?

-

\newcommand\myimg[2]{%