TheSwamp
Code Red => .NET => Topic started by: Bryco on July 08, 2009, 05:46:53 PM
-
I would like to show feet and inches in the DefaultValue for ed.GetDistance. I see there is a GetDefaultValueString but it is protected so I can't figure out how to use it.
-
I would like to show feet and inches in the DefaultValue for ed.GetDistance. I see there is a GetDefaultValueString but it is protected so I can't figure out how to use it.
Be careful with what I post.... lately have done a lot of mistakes.... (but this is the only way I will refresh my memory)
The below code works for me, but you need to set the units to architectural and dimzin to 3
Document doc = acadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
PromptDistanceOptions distPrmt = new PromptDistanceOptions("");
distPrmt.Message = "\nOffset distance: ";
distPrmt.DefaultValue = 96.0;
PromptDoubleResult offDist = ed.GetDistance(distPrmt);
if (offDist.Status != PromptStatus.OK) return;
Offset distance <8'-0">:
-
Thanks Luis. Seems like the units setting is all that is required