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

Use dwg (or dxf) files in a web browser.

16 REPLIES 16
Reply
Message 1 of 17
fabrizio.ranieri
8524 Views, 16 Replies

Use dwg (or dxf) files in a web browser.

Hello,

i am no autocad expert. Some client asked to me to realize a web application that should be able to

 

- acquire dwg/dxf file via http upload

- display the content of a dwg file in a web browser

- detect and move / change some item (walls, windows, etc.)

 

I didn't find any javascript library, and the only thing that comes to my mind is to convert dwg/dxf into svg. Can you suggest any alternative approach or product, even commercial non-free products?

Thank you

 

 

16 REPLIES 16
Message 2 of 17

Hi,

 

there may be some products available showing DWG or DXF, but exactly that point makes me loud thinking:

>> change some item (walls, windows, etc.)

In case of changing components of the drawing, you don't need a viewer, you need an editor; one step more: in case of architectural objects like doors and windows you need an editor like AutoCAD ACA or REVIT. That is not written in a day or 2.

Converting it to SVG (or any other viewer format) does not make it editable automatically, e.g. changing a window from one type to another means more than make lines longer or shorter, you have to update dimensions, hatches and so on. PLUS: when you return the SVG to e.g. REVIT you have destroyed the previous structure.

 

What is the goal, and why do anyone having AutoCAD trying to upload the drawing to modify it externally?

 

Look also to the >>>Autodesk 360<<<, there you have the chance to at least modify simple geometry objects.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 17
nestly2
in reply to: fabrizio.ranieri
Message 4 of 17

Thank you for your reply Alfred, i feel i missed some key information.

 

Though I am not allowed to tell my client's goal, i'll try to explain better my needs. Imagine this use case:

- someone build some flat 2d building plan using autocad (i.e. an apartment)

- he will then upload his dwg/dfx to our web platform

- the platform should be able to display that plan in a web page

- an user should be able, inside the platform, just interacting with his browser, to select walls, windows, doors, etc

- an user should be able to remove such an item (wall, door, window, etc.) or replace it with another (again, wall, door, window)

- the user should *not* draw any shape

 

To make it even easier, i could say i don't really care which format the altered file will be: i need to display the original source, then manipulate it and store it some way, any browser-friendly way would be ok. It will not be used in autocad never more, so i am not interested in keeping the original file structure.

 

I am a web developer, so my ideal solution would be something like

- a javascript rendering library to display the plan

- a javascript library to interact with the plan

 

to implement a simple interaction layer i would not call an editor. 

Please let me know if i can i provide any more info to be more specific.

 

Thank your,

f.

 

 

Message 5 of 17

Hi,

 

>> the platform should be able to display that plan in a web page

>> an user should be able, inside the platform, just interacting with his browser, to select walls, windows, doors, etc

Besides of Autodesk 360 it may also be done with the DWFx-format as it has the aibility to display DWF's, to select entities inside the DWF to show it's properties (as long as the DWF is prepared to show geometry properties,

 

but then....

>> user should be able to remove such an item (wall, door, window, etc.)

>> or replace it with another (again, wall, door, window)
Removing one wall means you have to close the others, you have to recalculate the hatches of the walls.

Replace objects means (e.g. change the width of the wall) you have to redesign all objects around, to recreate the dimensions, .... that's hard/deep CAD. And that is the point I guess you need a real CAD-application as front-end as your WEB-engine. And for that ... sorry, I don't know anything available on www.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 17
dgorsman
in reply to: fabrizio.ranieri

About the only thing you can do is work with ASCII DXF files.  Manipulation and display is strictly up to the developer.  Or you can purchase a RealDWG license from AutoDesk which includes the tools to manipulate DWG files, but display implementation is still up to the developer.

 

Of course, that *completely* skips over the problem of recognizing what a door, wall, etc. is in a drawing.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 17
fabrizio.ranieri
in reply to: dgorsman

I feared such an answer... so:
- import dxf
- parse dxf
- ...enjoy the pain

What if the user uploads a dwg? How to perform dwg -> dxf conversion?
Message 8 of 17
dgorsman
in reply to: fabrizio.ranieri

That would be where the RealDWG license comes in (in which case, you probably wouldn't need to convert - just read the content natively).  There may be other cheaper options for earlier DWG versions.  And that ignores any custom AEC/other vertical content which may be in the file.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 9 of 17

+1 for AutoCAD 360

Message 10 of 17

uhm

isn't AutoCAD 360 a product? Does it offer integration features?

Message 11 of 17
pendean
in reply to: fabrizio.ranieri

Yes it's a product, no I don't think you can use it the way you describe.
As noted by others, you will need to license and develop a solution to be hosted on your servers for the abilities you describe.
Message 12 of 17
jggerth1
in reply to: fabrizio.ranieri

Unless you absolutely have to recreate something from scratch -- take a look at TeamPlatform.  Never tried it myself, but it sounds like it covers all your bases.  Ralph G had a comparison writeup.

 

http://worldcadaccess.typepad.com/blog/2013/07/teamplatform-takes-on-the-email-ftp-dropbox-troika.ht...

Message 13 of 17
fabrizio.ranieri
in reply to: jggerth1

Thank you JGerth, i'll give it a look.
Message 14 of 17

Hi Fabrizio? did you make any progress with this project? Which direction did you go in the end? i'm also currently looking at something to just display a 2D dwg file in a web browser frame.

Message 15 of 17

Nope, no luck. My project is in standby as of now for many reasons

Should you find any useful info, can you please keep me updated? Thank you

Message 16 of 17

my situation is that i'm developing an "intranet" without a server so I'm using javascript.

 

I'm still struggling with dwg files as there seems to be a lot of work required, but so far I've had sort of a half success with dwf files. I used the embed html tag

 

<embed src="file://driveletter\path\file.dwfx" width=800 height=500>

 

This works in IE but not in chrome for some reason. A prerequisite is that design review needs to be installed (I have 2013 version). However, I know Autodesk are trying to push everyone to Autodesk360 so I'm not sure how much longer this functionality will remain. 

 

I'd still like something to just display the base dwg file though, no need for layer selecting and other view manipulations. I don't really want to create PDFs of several hundred old CAD files...

Message 17 of 17

Try this then

http://sharecad.org/it/DWGOnlinePlugin

 

It should allow for simple display

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

Post to forums  

Autodesk Design & Make Report

”Boost