Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

AutoCAD to SVG bad text formatting

Anonymous

AutoCAD to SVG bad text formatting

Anonymous
No aplicable

I am currently trying to convert a .dwg to .svg, and then replace text fields on the svg with new text. However, the svg remembers the position of each letter in the svg file, so when inputting new text, the new text is spaced according to how the (different) text in the svg was spaced. I want to make it so that the svg only remembers the position of the first letter, without having to go through the svg's xml code

0 Me gusta
Responder
Soluciones aceptadas (1)
2.055 Vistas
7 Respuestas
Respuestas (7)

pendean
Community Legend
Community Legend
There is no built-in SVG ability: so what driver or tool or software are you using?

pendean
Community Legend
Community Legend

-

0 Me gusta

Anonymous
No aplicable

There isn't an excel spreadsheet, the xml of the svg file for some text looks like this:

 

<text
transform="matrix(0,-1,-1,0,1839,3427)"
style="font-variant:normal;font-weight:normal;font-size:123.10199738px;font-family:Arial;-inkscape-font-specification:ArialMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="text318858"><tspan
x="0 71.891571 154.0006 188.22296 256.66766"
y="0"
sodipodi:role="line"
id="tspan318856">&lt;SI4&gt;</tspan></text>

 

(Had to put plain code because putting it as code ran it)

 

The text within angle brackets on the dwg is then changed using the svg file. What I was referencing in the question was the different coordinates for x (spaces between letters), when these are removed, the text formats correctly, but I was wondering if there was another way to fix the problem

 

I am converting the dwg to pdf, and then converting that pdf to svg using inkscape

0 Me gusta

TheCADnoob
Mentor
Mentor
Solución aceptada

Try going from Autocad to dxf and from dxf to inkscape. 

 

Im not sure this will solve your problem but I think the dxf should be a cleaner route

 

edit: i just tried this and seems to solve your problem (if i understood it correctly) The text field came in as an editable text field. There was some changes in the text size but it looked as though the text insertion point was where it was in the dxf (dwg) file. 

CADnoob

EESignature

0 Me gusta

Anonymous
No aplicable

That's perfect thanks, it reminded me that we used dxf files when originally making the svg files, which is why the old text labels worked and the new ones didn't

lyskyfy
Community Visitor
Community Visitor

How to convert a .dwg to .svg. I have tried to export the svg format file but I can not find the options.

I tried export and save as. But can not found svg format.

Clould you tell me how to convert a .dwg file to .svg file. 

Many Thanks.

0 Me gusta

pendean
Community Legend
Community Legend