Currently, the following issues are known to occur when generating SVGs.
Symbols in the SVG
Experience with many drawings has shown that there are frequently symbols (typically sinks, toilets, and urinals) that are displayed in the SVG outside the drawing area or are not visible at all.
Solution
In general, it is better to represent such elements as blocks. In these cases, the SVG file must be published again; this usually resolves the issue.
Blocks with scaling in DWGs not created with AutoCAD
If as-built drawings are created by external companies, DWGs exported from other CAD programs may cause difficulties during SVG generation. These often contain special scaling factors in the drawing elements that affect line weights, for example. The drawing looks correct in AutoCAD, but in the SVG, for example, extremely thin lines or extremely thick line segments appear.
Cause of the error and solution
The problematic elements are often blocks whose content is “nested,” i.e., one block inside another block.
In SVG, this manifests as a solid color area. Since more than one element is usually affected, the entire graphic may be obscured.
In the example, the issue stemmed from the arrowheads of the stair run lines, which were inserted as a block within a block. Additionally, the file originated from a third-party system and was not fully DWG-compatible. The text in the plan header (block) was also inserted as a separate block, which in turn had a scaling factor applied.
The drawing was actually supposed to look like this:
Solution
Block scaling factors
Make sure that existing block references do not have any scaling, or at least not a large scaling factor. If necessary, edit the block in the Block Editor by scaling it by the appropriate scaling factor using the VARIA command. Then remove the scaling factor from the block reference.
Nested blocks
Avoid nested blocks, i.e., blocks that contain other blocks. Explode child blocks using the URSPRUNG command; you may need to do this twice in a row if the block is still named *U#### after the first explosion. Alternatively, use the options "Explode nested blocks" and "Output everything in line width [mm]" when generating SVG.
Line type scaling in DWGs not created with AutoCAD
Another potentially problematic element in DWGs drawn with other CAD systems is line types that are scaled incorrectly in the SVG.
Line types from third-party systems have a range of scaling options that are not supported, or not fully supported, in AutoCAD. However, the lines are displayed correctly.
AutoCAD appears to export some line types correctly only if they are assigned directly to the drawing elements rather than just to the layer (BYLAYER).
Solution
If solid lines appear during SVG generation that should actually be displayed as dashed lines, the following method can often resolve the issue.
Check whether you have assigned the relevant lines directly to the line types, or whether they are set to BYLAYER / From Layer in the Properties window.
Select all lines where the line type is set to BYLAYER / FromLayer (Select a line – Ctrl+Shift+A Select Similar)
Change the line type assignment for the affected lines in the Properties window so that the line type is assigned directly to the style.
If necessary, change the line type factor for these lines.
Then republish the SVG. The lines should now be displayed correctly scaled in the SVG graphic.
Dimensioning in SVG
Generally, no “true” dimensions are displayed in the SVG. Dimension lines are not transferred to the SVG.
If dimensions are displayed, the dimension lines have been resolved beforehand; they therefore consist only of lines and text. Superscript numbers are not displayed correctly.
AutoCAD Dimensions
The following image shows the dimensions in AutoCAD.
Display in SVG
If the dimensioning is broken down and transferred during SVG generation, the result shown below is obtained. The superscript numbers have the same font size as the other numbers, and this often leads to overlapping.
Therefore, it is recommended not to transfer dimensions from AutoCAD to the SVG.
Hatching and SOLIDs
Hatching and SOLIDs are now supported—however, keep in mind that small-scale hatching in particular unnecessarily increases the size of the SVG file.