Equivalent to ObjectARX acdbDistF() in AutoCAD.NET

<?xml encoding=”UTF-8″>by Fenton Webb

I just had one of those frustrating moments where I couldn’t find a function I wanted in .NET Smile I knew what it was in ObjectARX, but not in .NET… After what seemed hours (5 mins) I ended up searching the AutoCAD source and found it. Anyway, I thought I’d post it here for you guys (and Google) as a reference.

If you want to convert a decimal value to a string UNITS, then in ObjectARX the function is:

<span>int</span> <span>acdbDisToF</span>(<span>const</span> ACHAR * <span>str</span>, <span>int</span> <span><font color="#000000">unit</font></span>, ads_real * <span>v</span>);

the equivalent function in AutoCAD.NET is

Autodesk.AutoCAD.Runtime.Converter.DistanceToString()

<p> </p>

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading