PDFIMPORTIMAGEPATH and per-import layer prefixes

- PDFIMPORTIMAGEPATH names the image extraction folder: relative to the
  PDF's folder (default "PDF Images"), absolute as given, "." for none.
- Every import of the session gets the next prefix (PDF_, PDF2_, PDF3_ ...),
  also when the same file is imported again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-25 12:22:43 +03:00
1 parent edbbc9d135
commit 72f7ff5cc5
4 files changed
+61 -22

No files matched your search

+19
View File
@@ -1022,6 +1022,7 @@ impl OpenCADStudio {
| "PDFIMPORTMODE"
| "PDFIMPORTFILTER"
| "PDFIMPORTLAYERS"
| "PDFIMPORTIMAGEPATH"
| "XDWGFADECTL"
| "POINTCLOUDCLIPFRAME"
| "XCLIPFRAME"
@@ -1158,6 +1159,24 @@ impl OpenCADStudio {
}
return Some(self.finish_dispatch(cmd));
}
// A folder name; "." clears it.
if name == "PDFIMPORTIMAGEPATH" {
use crate::modules::insert::pdf_import::{image_path, set_image_path};
match &value {
Some(value) => {
let value = value.trim().trim_matches('"');
set_image_path(if value == "." { String::new() } else { value.to_string() });
}
None => {
self.command_line.push_output(&format!(
"Enter new value for PDFIMPORTIMAGEPATH, or . for none <\"{}\">:",
image_path()
));
self.pending_setvar = Some(name.clone());
}
}
return Some(self.finish_dispatch(cmd));
}
if matches!(name.as_str(), "PDFOSNAP" | "UOSNAP") {
let current = i16::from(crate::scene::model::pdf_vector::pdf_osnap());
if let Some(value) = &value {