protected override Autodesk.AutoCAD.EditorInput.SamplerStatus Sampler(Autodesk.AutoCAD.EditorInput.JigPrompts prompts) { JigPromptPointOptions ppo = new JigPromptPointOptions("\nSelect point"); ppo.UseBasePoint = true; ppo.BasePoint = _text.Position; ppo.UserInputControls = UserInputControls.Accept3dCoordinates | UserInputControls.NoZeroResponseAccepted; PromptPointResult ppr = prompts.AcquirePoint(ppo); if (ppr.Status != PromptStatus.OK) { return(SamplerStatus.Cancel); } if (_position == ppr.Value) { return(SamplerStatus.NoChange); } _position = ppr.Value; return(SamplerStatus.OK); }
protected override Autodesk.AutoCAD.EditorInput.SamplerStatus Sampler(Autodesk.AutoCAD.EditorInput.JigPrompts prompts) { JigPromptPointOptions ppo = new JigPromptPointOptions("\nУкажите точку"); ppo.UseBasePoint = true; ppo.BasePoint = this.Origin; ppo.UserInputControls = UserInputControls.NoZeroResponseAccepted; PromptPointResult ppr = prompts.AcquirePoint(ppo); if (ppr.Status != PromptStatus.OK) { return(SamplerStatus.Cancel); } if (_jigPosition == ppr.Value.TransformBy(_ucs.Inverse())) { return(SamplerStatus.NoChange); } _jigPosition = ppr.Value.TransformBy(_ucs.Inverse()); lock (Entities) { _createGrid(_jigPosition); } return(SamplerStatus.OK); }
protected override Autodesk.AutoCAD.EditorInput.SamplerStatus Sampler(Autodesk.AutoCAD.EditorInput.JigPrompts prompts) { JigPromptPointOptions jigOpts = new JigPromptPointOptions(); jigOpts.UserInputControls = UserInputControls.GovernedByOrthoMode | UserInputControls.NullResponseAccepted; jigOpts.UseBasePoint = true; jigOpts.BasePoint = (Point3d)this.startPoint; jigOpts.Message = "\n 选择下一点或者Enter结束"; PromptPointResult res = prompts.AcquirePoint(jigOpts); Point3d positionTemp = res.Value; this.endPoint = positionTemp; if (res.Status == PromptStatus.Cancel || res.Status == PromptStatus.None) { return(SamplerStatus.Cancel); } else { return(SamplerStatus.OK); } }
Sampler(Autodesk.AutoCAD.EditorInput.JigPrompts prompts) { AcEd.SamplerStatus samplerStatus = AcEd.SamplerStatus.NoChange; AcEd.JigPromptPointOptions opts = new AcEd.JigPromptPointOptions(); opts.Message = "\nPoint"; opts.BasePoint = m_startPt; opts.UseBasePoint = true; opts.UserInputControls |= AcEd.UserInputControls.AnyBlankTerminatesInput | AcEd.UserInputControls.NullResponseAccepted; AcEd.PromptPointResult result = prompts.AcquirePoint(opts); if (result.Status == AcEd.PromptStatus.OK) { if (m_endPt != result.Value) { m_endPt = result.Value; samplerStatus = AcEd.SamplerStatus.OK; } } return(samplerStatus); }