-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync Branch 20240619 mme #6 support dynamic blocks read evaluation graphs and block visibility parameters #419
Conversation
…isibilityParameter
…port-dynamic-blocks-read-evaluation-graphs-and-block-visibility-parameters
…graphs-and-block-visibility-parameters' of https://github.com/nanoLogika/ACadSharp into 20240619_mme_#6-support-dynamic-blocks-read-evaluation-graphs-and-block-visibility-parameters
…d-evaluation-graphs-and-block-visibility-parameters
Hi @mme1950, I'm planning to release the v1 shortly, but before I would like to change the structure of the project, keep an eye on this PR: If you plan to implement this feature before, let me know and I will hold the changes. |
Hi @DomCR, |
Hi @DomCR, |
I don't mind to merge the changes, they are quite isolated and are not breaking anything, but you need to update your branch so the README doesn't change and fix the functionality issues like the Clone() method. |
…d-evaluation-graphs-and-block-visibility-parameters
Hello @DomCR, I have commited the corrections. |
One last fix in the Clone() method and we are good to go. |
README.md
Outdated
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 file should not be modified.
/// Represents an evaluation graph containing a list of <see cref="GraphNode"/> | ||
/// objects. | ||
/// </summary> | ||
public class EvaluationGraph : NonGraphicalObject |
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.
Please add the corresponding DxfName
and DxfSubClass
attributes for this class.
{ | ||
EvaluationGraph clone = (EvaluationGraph)base.Clone(); | ||
|
||
clone.Nodes.Clear(); |
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.
Careful here, the List instance is shared for the current instance and the clone, you'll need to initialize a new list to avoid clearing both of them.
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 part is still not fixed, the issue is that when you clone this instance the list will be shared between both:
object current.list <= same instance
object clone.list <= same instance
clone.list.clear() => will also clear the current.list instance
the solution will be:
//Create a new instance of the list before adding the items
clone.Nodes = new ();
/// Gets a <see cref="CadObject"/> associated with this <see cref="CadObject"/>. | ||
/// </summary> | ||
[DxfCodeValue(360)] | ||
public CadObject NodeObject { get; internal set; } |
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.
Can we be more specific about which CadObject
are we storing?
The set is internal but it may help to identify which objects can be linked in the node.
I think they are all related to the subclass AcDbEvalExpr
which is shared for BLOCKVISIBILITYGRIP, BLOCKGRIPLOCATIONCOMPONENT, BLOCKBASEPOINTPARAMETER... and more I guess.
/// Represents a BLOCKVISIBILITYPARAMETER object, in AutoCAD used to | ||
/// control the visibility state of entities in a dynamic block. | ||
/// </summary> | ||
public class BlockVisibilityParameter : CadObject |
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 think this class should be moved to the ACadSharp.Blocks
folder/namespace, this is the first one that defines a dynamic block but looking to a dxf I can see that there are other classes that share the dxf subclasses like AcDbEvalExpr, AcDbBlockElement, AcDbBlockParameter... if we can identify what they do we can start implementing them.
No description provided.