Skip to content
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

Dynamic-block states are read but not inserted into States list #552

Open
mme1950 opened this issue Feb 9, 2025 · 0 comments
Open

Dynamic-block states are read but not inserted into States list #552

mme1950 opened this issue Feb 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mme1950
Copy link
Contributor

mme1950 commented Feb 9, 2025

The States list of the BlockVisibilityParameter object is not filled.

Suggestion (CadBlockVisibilityParameterTemplate):

	public override void Build(CadDocumentBuilder builder)
	{
		base.Build(builder);

		BlockVisibilityParameter bvp = this.CadObject as BlockVisibilityParameter;

		foreach (var handle in this.EntityHandles)
		{
			if (builder.TryGetCadObject(handle, out Entity entity))
			{
				bvp.Entities.Add(entity);
			}
			else
			{
				builder.Notify($"[{bvp.ToString()}] entity with handle {handle} not found.");
			}
		}

		foreach (var item in StateTemplates)
		{
			item.Build(builder, this.EntityHandles);
			bvp.States.Add(item.State);
		}
	}
@mme1950 mme1950 added the bug Something isn't working label Feb 9, 2025
@mme1950 mme1950 changed the title Dynamic-block states are read but not a inserted into States list Dynamic-block states are read but not inserted into States list Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant