Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a grid of rectangles. I want to use MStretch to stretch one side of a subset of the rectangles, but I only want to select the rectangles and not all the objects (lines, blocks, etc.) in the same location.
If I preselect objects and then start the command the preselected objects are unselected. I have only tried the below. Are there any other ways of interacting with the MStretch that might work for me?
TypedValue[] tvs = new TypedValue[] {
new TypedValue((int)DxfCode.Operator,"<or"),
new TypedValue((int)DxfCode.Operator,"<and"),
new TypedValue((int)DxfCode.LayerName,"WORK_BOUNDARY"),
new TypedValue((int)DxfCode.Start,"LWPOLYLINE"),
new TypedValue((int)DxfCode.Operator,"and>"),
new TypedValue((int)DxfCode.Operator,"or>")};
SelectionFilter sf = new SelectionFilter(tvs);
doc.Editor.WriteMessage("Enter to modify selected workshapes");
PromptSelectionResult acSSPrompt = doc.Editor.GetSelection(sf);
SelectionSet selectionSet = acSSPrompt.Value;
ed.SetImpliedSelection(selectionSet);
doc.SendStringToExecute("MStretch", true, false, true);
I have used the same technique/code for other commands such as MOVE.
Solved! Go to Solution.