- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How do I get this to loop until I either hit ESC or actually select a block?
// Setting entity prompt, reject message and allowed class type.
PromptEntityOptions opts1 = new PromptEntityOptions("");
opts1.Message = "\nSelect a TGDraw conveyor bed to get the elevation dimension: ";
opts1.SetRejectMessage("\nMust be a valid TGDraw block, try again: ");
opts1.AddAllowedClass(typeof(BlockReference), true);
PromptEntityResult ent1 = ed.GetEntity(opts1);
if (ent1.Status == PromptStatus.Cancel) return;
// reads the selected block and extracts properties and attributes
BlkStrct elevation = new BlkStrct();
elevation = ReadBlock(ent1.ObjectId);
string bname = elevation.blkName.Substring(0, 3);
if (!BlockFilter("bed filter", bname))
{
return;
}
I know it has to be simple, but I am not seeing the solution.
Thanks for your help.
Sonny
scott.sawdy@bluecoyotecad.com
Solved! Go to Solution.