-
-
Notifications
You must be signed in to change notification settings - Fork 173
Conversation
...nd round-trip operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have to think about the best way to implement this, by now I leave some notes that I think it will help you to avoid code repetition.
The ensure methods could be replaced for Table.TryAdd it works in the same way and is directly implemented in all the tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder creation should be initialized in TestSetup is it giving trouble in ryder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enum is repeated, DxfCode enum contains all this fields, look for ExtendedData at the end, starts with the value 1000.
You can also check the classes in XData folder for the dedicated classes for each type fo data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the class DxfMap it creates this exact same structure and there is already methods to get and set the values for CadObjects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point with this method, I would use directly the name such as:
return this.TryGet(app.Name, out value);
I see some other errors in this class like public void Add(AppId app, IEnumerable<ExtendedDataRecord> records) is not checking that the AppId is in the document.
DomCR
commented
Nov 28, 2025
Proposal for this implementation:
Dimension Methods:
Dimension.SetStyleOverride(DimensionStyle)
Method setps:
if style == null //Remove Extended data entry DSTYLE else //1 Create DxfMap for dimstyle DxfMap.Create<T> //2 Compare Dimension.Style vs override style using DxfMap foreach p in DxfMap.DxfProperties if p.value(style) != p.value(override) //Add to extended data else //continue //End: have the edata updated using the dim override as a parameter
Dimension.GetStyleOverride(DimensionStyle)
Method setps:
if override == null => return null; //Clone current style //Map the properties from edata into a dxfmap //override de edata values into the clone return the clone
Let me know what you think about this approach.
Description
Implemented overrides for DimensionStyle in Dimension.cs
Related Issues / Pull Requests
Notes for reviewer