writer icon indicating copy to clipboard operation
writer copied to clipboard

In-block Dimension cannot be displayed

Open FishOrBear opened this issue 2 years ago • 2 comments

block.zip in autocad Double-click the edit block, save it, and it will be displayed

FishOrBear avatar Apr 12 '23 03:04 FishOrBear

Please can you provide some code example

tarikjabiri avatar Apr 12 '23 09:04 tarikjabiri

        let dxf = new DxfWriter;

        let block = dxf.addBlock("test");

        let f1 = {
            x: 1524.2424242424242,
            y: -18,
            z: 1470.6390303028093
        };

        let f2 = {
            x: 1524.2424242424242,
            y: -18,
            z: 270.63903030280926,
        };

        let opt: LinearDimOptions = {
            extrusion: {
                x: 0,
                y: -1,
                z: 0
            },
            middlePoint: {
                x: 1693.1677672727274,
                y: 870.6390303028093,
                z: 18
            },
            definitionPoint: {
                x: 1693.1677672727274,
                y: -18,
                z: 870.6390303028093
            },
            angle: 270
        };

        block.addEntity(new LinearDimension(f1, f2, opt));
        block.addLine({ x: 0, y: 0, z: 0 }, { x: 100, y: 0, z: 0 });

        dxf.addInsert("test", { x: 0, y: 0, z: 0 });

FishOrBear avatar Apr 13 '23 08:04 FishOrBear