forked from 1b-agent/opencadstudio-upstream
Sheet sets: Place on Sheet, sheet view menus, block lists, missing status, field refresh
Model Views lists named model views and places them on the current sheet (xref, viewport, paper-space named view, view label with navigation fields, sheet view record); sheet view rows get Display, Rename & Renumber View, Set category, Place Callout Block and Place View Label Block; the View Category dialog's Add Blocks opens List of Blocks / Select Block; a sheet whose relative path is gone shows missing; sheet set fields store their values when a set changes; named views keep their centre relative to the target. Codec pin moves to the revision with these field helpers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
5c9f19a4dc
commit
0d0fbafaa8
31 files changed
+1370
-88
No files matched your search
@@ -387,6 +387,18 @@ pub fn attach_attribute_fields(document: &mut CadDocument, insert: Handle) -> Ve
|
||||
document.attach_attribute_fields(insert, &context)
|
||||
}
|
||||
|
||||
/// Store fresh values for the sheet set fields (after a sheet set changed).
|
||||
pub fn refresh_sheet_set_fields(document: &mut CadDocument) -> Vec<Handle> {
|
||||
let context = OcsFieldContext(None);
|
||||
document.refresh_sheet_set_fields(&context)
|
||||
}
|
||||
|
||||
/// [`attach_attribute_fields`] with every field code passed through `map`.
|
||||
pub fn attach_attribute_fields_mapped(document: &mut CadDocument, insert: Handle, map: &dyn Fn(&str) -> String) -> Vec<Handle> {
|
||||
let context = OcsFieldContext(None);
|
||||
document.attach_attribute_fields_mapped(insert, &context, map)
|
||||
}
|
||||
|
||||
/// Whether any attribute definition of `block` hosts a field.
|
||||
pub fn block_has_attribute_fields(document: &CadDocument, block: &str) -> bool {
|
||||
let Some(record) = document.block_records.iter().find(|r| r.name.eq_ignore_ascii_case(block)) else {
|
||||
|
||||
Reference in new issue
Block a user