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
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 -
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.
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 -
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.
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.
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.
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.
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
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...