Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Name polygons and export to svg.... Correct workflow anyone?

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
1822 Views, 11 Replies

Name polygons and export to svg.... Correct workflow anyone?

Hello Autodesk community, 

 

Anyone can help me with this? 

Using Autodesk software suites, would be great if could just use AutoCad for it. 

 

 

What would the best workflow be for this? 

 

-Convert or redraw polylines to simple polygons. 

-Label each polygon with a unique code an id=xxxxxx or something that will survive the export process. 

 

So once exported to .svg format the label is in tact. 

Eg. <path d="M454.76,266.19h63a24.34,24.34,0,0,1,24.47,24.21h0V489.82A24.34,24.34,0,0,1,517.74,514h-63a24.34,24.34,0,0,1-24.47-24.21h0V290.4a24.34,24.34,0,0,1,24.47-24.21h0Z" class="map__space" data-code="exampleXXXXXX”></path>

 

-Then export to svg with origin in the top left corner to match svg's 

 

Anyone? 

 

Could really use some help with this. 

 

 

11 REPLIES 11
Message 2 of 12
jggerth
in reply to: Anonymous

AutoCAD doesn't deal with SVG....  which is a huge pity.  AFAIK, the  way to get from DWG to SVG is to export the DWG to DXF, then use Inkscape or some other program to convert to SVG.

 

Possibly look for a WMF to SVG converter - and WMFOUT the geometry you want.

 

Either way, I suspect you'll be doing most of the work in the SVG editor you're using, rather than in Acad.

 

Option D if it's a big deal, and has a _really_ large budget, is to hire a programming team to write an export interface from DWG to SVG with whatever bells and whistles you want.

Message 3 of 12
john.vellek
in reply to: Anonymous

Hi @Anonymous,

 

This is an interesting workflow. Can you attach a couple sample drawings so I can see this in more detail? I would wager that there are some LISP routines out there that can do the poyline>polygon conversion or at least get you started.

I also envision that you could attach some fields to capture the geometric data as well.

 

As far as getting to a SVG file format, why not export as an EPS file and then convert it outside of AutoCAD?

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 4 of 12
Anonymous
in reply to: Anonymous


@Anonymous wrote:

Hello Autodesk community, 

 

Anyone can help me with this? 

Using Autodesk software suites, would be great if could just use AutoCad for it. 

 

 

What would the best workflow be for this? 

 

-Convert or redraw polylines to simple polygons. 

-Label each polygon with a unique code an id=xxxxxx or something that will survive the export process. 

 

So once exported to .svg format the label is in tact. 

Eg. <path d="M454.76,266.19h63a24.34,24.34,0,0,1,24.47,24.21h0V489.82A24.34,24.34,0,0,1,517.74,514h-63a24.34,24.34,0,0,1-24.47-24.21h0V290.4a24.34,24.34,0,0,1,24.47-24.21h0Z" class="map__space" data-code="exampleXXXXXX”></path>

 

-Then export to svg with origin in the top left corner to match svg's 

 

Anyone? 

 

Could really use some help with this. 

 

 

Draftsight exports SVG's.  EXPORTSVG is the command.

Message 5 of 12
john.vellek
in reply to: Anonymous

Hi @Anonymous,

 

I am checking back to see if my post or others helped you with your problem.
Please add a post with how you decide to proceed and your results so other Community members may benefit.

Please select the Accept as Solution button if a post or posts fully solved your issue or answered your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 6 of 12
Anonymous
in reply to: jggerth

Thanks JGerth. 

 

We played with writing something to grab layers and merge them outside of AutoCAD then convert to SVG. 

However we realized after further playing around that DXF gives us a better output, plus there is more of a development ecosystem to work with. 

 

So now we are: 

 

- Redrawing in AutoCad simple polygons

- Exporting as DXF

- Importing into some custom JS that we can click and name. 

 

More accurate and easier for us to name outside of Autocad. 

 

Thank you for all your help. 🙂 

Im sure I will be back. 

Message 7 of 12
Anonymous
in reply to: john.vellek

Thanks John 🙂

So we realized that we don't need svg. We made an assumption that svg was going to be the easiest for us to work with. But it seems that DXF is much better for us. So now we are exporting as DXF and then have built something in js. to click and name the objects.

Still working on the semi-automated way to convert lines to polygons. Not sure how that will go. We need very simple shapes, because we are just representing spaces like a shopping mall directory (kinda, gives you an idea at least).

We want to be able to take a floorplan and convert to simple polygons.Minimal vertexs/ points....

Do you know of anyway to easily convert lines to polygons?

Thanks John.





Message 8 of 12
john.vellek
in reply to: Anonymous

Hi @Anonymous,

 

Have you tried JOIN and then select all the lines?  This might work although you might want to do it on a bylayer basis or bycolor.

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 9 of 12
Anonymous
in reply to: Anonymous

I have a very similar requirement to add names for space polygons for using it for a web platform. Can you suggest any formats other than SVG to fulfill this requirement? How did the DXF with JS work out for you? 

 

Best,

Tj

Message 10 of 12
TerryDotson
in reply to: Anonymous

Whats being asked is quite doable, straight out of AutoCAD.  We have a good SVG writer so the question is where would the extra information be stored in the drawing.  Would this be text inside the boundary like Class:MapSpace or would the data need to be Xdata on the polyline.

 

Lastly for curiosity, what target would consume this SVG content, some web based application we're not aware of?

Message 11 of 12
Anonymous
in reply to: Anonymous

Hi Tj, 

 

The DXF's worked out well. We ended up importing them into a custom web application then naming them within the app and linking them with data straight out of a graph database. The result was great! 

We are using it now for leasing and sales management for the real estate industry. 

gioworx.com 

 

Let me know if you have any other questions. 
Can always email me codi@gioworx.com 

 

Cheers! 


leasing and asset management, commercial and residential proptech, real estate technology, portfolio mangement - project overview.gif

Message 12 of 12
Anonymous
in reply to: TerryDotson

Hi Terry, 

 

 

Thank you for the response. I had forgotten about this thread. 
We ended up using DXF over SVG. If we had your experience with SVG's we might have saved some time, however, we had to make do with what we had/ knew at the time. 

 

We are happy with the result thus far. 

 

The DXF's can be imported directly into our web application and linked with a database. So we can provide building data currently only sales and lease data across projects or whole portfolios. It's in early stages at the moment, currently in beta. We are currently working on a front facing website for inquiries. 

 

If you would like any more information please let me know. 

Thank you again and all the best! 

 

 

codi@gioworx.com 

gioworx.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report