aliases: import AutoCAD PGP files and support UCS-follow workflows

This commit is contained in:
Pictus08 committed 2026-10-14 20:46:35 -03:00
1 parent 2414721c14
commit d19c797685
39 files changed
+818 -30

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# Importing AutoCAD command aliases (.pgp)
1. Run `ALIASEDIT` in OpenCADStudio.
2. Choose **Import PGP…** and select an AutoCAD or OpenCAD `.pgp` file.
3. Review the working rows. Supported imported aliases override matching
existing aliases; other existing aliases are retained.
4. Choose **Apply** to activate and save the rows, or close and discard them.
There is no automatic discovery or loading of AutoCAD profiles. Importing only
changes the editor's working rows; it never changes the active table until
Apply. The source PGP is not modified.
## Format and compatibility
- UTF-8 (with or without BOM) and legacy Windows-1252 are accepted.
- `;` comments, whitespace padding and case-insensitive names are supported.
- The last definition of an alias wins, including user overrides at the end.
- Common Spanish command targets are translated, for example `COPIA` to
`COPY`, `EMPALME` to `FILLET` and `SCP` to `UCS`. Alias keys are not translated.
- Only registered command targets are imported. Unsupported commands and
unmapped translations are counted in the editor's summary and do not replace
existing aliases. Full diagnostics are logged, rather than flooding the
command line with errors. This does not implement missing AutoCAD/Civil 3D
commands or add support for every AutoCAD language.
- External-program definitions are ignored and never executed.
## Synthetic example
This minimal example is authored for testing, not copied from an Autodesk PGP:
```text
; Last definition wins; imported aliases remain drafts until Apply.
E, *BORRA
E, *EMPALME
CC, *COPIA
SQ, *SCP
```
After importing, `E` resolves to `FILLET`, `CC` to `COPY`, and `SQ` to `UCS`.
No proprietary PGP or user profile is included with this feature.
+33
View File
@@ -0,0 +1,33 @@
# UCS input and UCSFOLLOW
## Direct point input
After running `UCS`, a click or typed coordinate can immediately supply the
new origin, followed by a point on the positive X axis and a point in the
positive XY plane. Explicit `3P` input continues to work. `Origin` / `O` still
changes only the origin with one point.
The interactive option prompt also accepts Spanish keywords, including
`Universal`, `Vista`, `Cara`, `Objeto`, `Origen`, `Guardar`, `Eliminar`,
and `3p` / `3 puntos`, as well as international English option keywords.
## UCSFOLLOW
- `UCSFOLLOW 0`: keep the camera orientation when the UCS changes.
- `UCSFOLLOW 1`: align the view immediately with the current UCS XY plane and
follow later UCS changes. Re-entering `1` realigns after a manual orbit.
- Bare `UCSFOLLOW` prompts for the value; Enter keeps the current setting.
- `SETVAR UCSFOLLOW 0` and `SETVAR UCSFOLLOW 1` work too.
The value belongs to the model pane / floating viewport and uses the drawing's
existing VPORT/VIEWPORT fields, not a global application preference. Paper
space itself does not follow the UCS: enter a model viewport first. BEDIT's
special block-reframing path is intentionally left unchanged.
The immediate alignment on entering `1` is deliberate: users can define their
UCS first, then enable following without another UCS change.
A user-defined alias such as `UF,*UCSFOLLOW` can invoke this command. It is not
installed automatically. A PGP imported before this command was implemented
must be imported again (or edited manually) to add its previously skipped
alias; activating it still requires Apply.