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

BlockRef issue #30

Open
dsn27 opened this issue Apr 21, 2021 · 0 comments
Open

BlockRef issue #30

dsn27 opened this issue Apr 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@dsn27
Copy link
Collaborator

dsn27 commented Apr 21, 2021

  1. Create BlockRef via code
  2. Export project to DXF file
  3. Open DXF file again
  4. BlockRef is missing

Only line0 will be shown again.

Code to create a BlockRef

GeoObject.Line line0 = GeoObject.Line.Construct();
line0.StartPoint = new GeoPoint(0, 0);
line0.EndPoint = new GeoPoint(100, 0);
cadControl.CadFrame.Project.SetDefaults(line0);
cadControl.CadFrame.Project.GetActiveModel().Add(line0);

GeoObject.Line line1 = GeoObject.Line.Construct();
line1.StartPoint = new GeoPoint(0, 0);
line1.EndPoint = new GeoPoint(100, 100);
cadControl.CadFrame.Project.SetDefaults(line1);

GeoObject.Line line2 = GeoObject.Line.Construct();
line2.StartPoint = new GeoPoint(0, 100);
line2.EndPoint = new GeoPoint(100, 0);
cadControl.CadFrame.Project.SetDefaults(line2);

GeoObject.Block block = GeoObject.Block.Construct();
block.Add(line1);
block.Add(line2);
cadControl.CadFrame.Project.SetDefaults(block);

GeoObject.BlockRef blockRef = GeoObject.BlockRef.Construct(block);
cadControl.CadFrame.Project.SetDefaults(blockRef);

cadControl.CadFrame.Project.GetActiveModel().Add(blockRef);

grafik

@dsn27 dsn27 added the bug Something isn't working label Aug 9, 2021
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