NicoChe
Computer
- Jan 27, 2022
- 2
Hello,
I'm trying to develop a macro to draw rectangles in a CATDrawing. I also want to apply a layer value to the rectangles.
First issue: drawing a rectangle. Interactively it is easy, there is a dedicated command for rectangles, but in the macro it appears I can only create lines, therefore not really connected to each other, is there a solution to this with a method I didn't see in the Factory2D ? Link
Second issue: exporting my drawing to a DXF file. The "save as" solution appears to work, but when reading the DXF file with Autocad, even if I draw interactively a rectangle (so, a closed geometry) in my CATDrawing, the result is 4 lines that are not connected to each other (visually it is closed, but it is not like a closed polyline).
I managed to get connected lines by using blocks, but then when exporting in DXF format with the correct options (keeping blocks), I lose the layer value... It appears it's either the connected lines or the layers, but not possible to keep both.
If someone has any idea on how to solve any of these problems, I'd be so grateful !
Thanks in advance,
Nico
I'm trying to develop a macro to draw rectangles in a CATDrawing. I also want to apply a layer value to the rectangles.
First issue: drawing a rectangle. Interactively it is easy, there is a dedicated command for rectangles, but in the macro it appears I can only create lines, therefore not really connected to each other, is there a solution to this with a method I didn't see in the Factory2D ? Link
Second issue: exporting my drawing to a DXF file. The "save as" solution appears to work, but when reading the DXF file with Autocad, even if I draw interactively a rectangle (so, a closed geometry) in my CATDrawing, the result is 4 lines that are not connected to each other (visually it is closed, but it is not like a closed polyline).
I managed to get connected lines by using blocks, but then when exporting in DXF format with the correct options (keeping blocks), I lose the layer value... It appears it's either the connected lines or the layers, but not possible to keep both.
If someone has any idea on how to solve any of these problems, I'd be so grateful !
Thanks in advance,
Nico