Improved Paper Space Layout management - #1096
Conversation
| public override void Add(Layout entry) | ||
| { | ||
| if (!isDefaultLayout(entry)) | ||
| entry.AssociatedBlock.Name = findSmallestFreePaperSpaceName(this._dictionary.Document); |
There was a problem hiding this comment.
I don't think is necessary to change the name of the block, I know that the standard has to be named PaperSpace(number) but after the first one, the others don't seem to effect the output.
There was a problem hiding this comment.
Yes, it's not required. DWG files are still valid, though.
| layout.AssociatedBlock.Name.Equals(BlockRecord.ModelSpaceName, StringComparison.InvariantCultureIgnoreCase); | ||
| } | ||
|
|
||
| private static string findSmallestFreePaperSpaceName(CadDocument doc) |
There was a problem hiding this comment.
This method could be a public method for the user to assign the next valid name to the layout block.
Another option could be to implement the method CreateLayout in the collection which it will add a layout with the valid name and return the result.
|
Apologize for the delayed review. |
|
While working on this I realized that proper paper-space layout management is a larger, interconnected task than what this PR covers. Should probably be done as one coherent effort. Is there anything here you'd want to keep? Otherwise I'm happy to close it. Let me know what you prefer. |
|
I agree that the Layouts have a tight coupling with the Associated block which causes a rise of complexity we can close this one and I'll take a look on that relationship between blocks and layouts. Thanks for the help! |
Description
Follow-up of PR #1086