Replies: 1 comment
-
You could explore what .NET’s API has to offer with regards prompting, I.e. the PromptOptions class hierarchy in Autodesk.AutoCAD.EditorInput. Additionally, sample ArxSdk\ARX2026\samples\database\ARXDBG\Prompt has a similar prompting class hierarchy in C++.
Yes, it should be part of a prompting framework. It’s hard to do though, one company I worked for had this and it was complex/unintuitive. I would be interesting to see how this can be done in python
Sometimes, though, there are other times where I felt it gets in the way, for example .NET’s implementation of the Editor space seems overly engineered. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Framework for Creating Complex Commands
I'm planning to create a simple framework for building complex commands in PyRx. The goal is to make command creation more declarative and user-friendly. Here's what I envision:
Proposed API
Command Line Interaction
Step Definition Classes
Classes like
GetPoint
,GetDist
,GetAngle
define command steps with the following parameters:name
: Used to create keyword (could also be a separatekword
argument)prompt
: Base prompt displayed in command line. The framework automatically adds:required
: Whether the value must be provided by the userallow_kwords
: Whether switching to another step via keyword is allowed at this stage (keywords are automatically generated from defined steps)default
: Default value assigned to the step if not required, and displayed to user when they invoke this step via keywordverifiable
(not shown): Step is not required (may have default value or not), but this step is shown to the user. User can press Enter which results in setting aMISSING
value for this stepContext Manager Support
I also plan to add a context manager that allows fine-tuning of pre-defined commands for different scenarios:
Benefits
This framework would provide:
Questions for Discussion
pyrx.ed.prompt
Beta Was this translation helpful? Give feedback.
All reactions