Author Topic: How to get a Point or Text using jig?  (Read 1885 times)

0 Members and 1 Guest are viewing this topic.

softempire

  • Guest
How to get a Point or Text using jig?
« on: December 14, 2015, 10:06:17 AM »
Hi everyone,

I'm a new comer of this forum and does anyone know how to get a Point or Text using jig?

My case looks like I need to create a circle, and we should support picking a location or just input the radius.

I know the jig behavior is controlled by the UserInputControls property, but I still can't figure out which values to use.

    jigPtOpts->UserInputControls = UserInputControls::Accept3dCoordinates |
                                   UserInputControls::NoZeroResponseAccepted |
                                   UserInputControls::NullResponseAccepted |
                                   UserInputControls::NoNegativeResponseAccepted;

And I want to use the .NET API. Thanks very much in advance!
« Last Edit: December 14, 2015, 10:09:55 AM by softempire »

BillZndl

  • Guest
Re: How to get a Point or Text using jig?
« Reply #1 on: December 14, 2015, 12:48:16 PM »
This should allow you to pick a point on the AutoCAD screen.

Code - C#: [Select]
  1. PromptPointOptions options = new PromptPointOptions("\nPick a point for insert: ");
  2.                 options.AllowNone = false;
  3.                 PromptPointResult point = editor.GetPoint(options);
  4.                 if (point.Status == PromptStatus.OK)
  5.                 { //use point.Value for something
  6.  

softempire

  • Guest
Re: How to get a Point or Text using jig?
« Reply #2 on: December 14, 2015, 05:39:49 PM »
This should allow you to pick a point on the AutoCAD screen.

Code - C#: [Select]
  1. PromptPointOptions options = new PromptPointOptions("\nPick a point for insert: ");
  2.                 options.AllowNone = false;
  3.                 PromptPointResult point = editor.GetPoint(options);
  4.                 if (point.Status == PromptStatus.OK)
  5.                 { //use point.Value for something
  6.  

Thanks for your reply. But how the user can input the text? What I need is to let the user to pick a point or input the text, not prompt he to pick the point and then prompt he to input the text...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to get a Point or Text using jig?
« Reply #3 on: December 14, 2015, 06:27:44 PM »
Code - C#: [Select]
  1.  
  2. //Gets the radius of the circle from the user using GetDistance command
  3.         //and draw the circle.
  4.         //The user can either specify the number in the command prompt or
  5.         //The user can set the distance (in this case radius of circle) also
  6.         //by specifying two locations on the graphics screen.
  7.         //AutoCAD draws a rubber-band line from the first point to
  8.         //the current crosshair position to help the user visualize the distance.
  9.         [CommandMethod("GetDistance")]
  10.         public void DistanceTest()
  11.         {
  12.  // < ... >
  13. }
  14.  

C:\ObjectARX 2016\samples\dotNet\Prompts\prompts.cs
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.