Earlier this year Microsoft announced new integration with Autodesk AutoCAD for Microsoft OneDrive and SharePoint. We work with several clients who use AutoCAD drawings extensively, and this had previously been a major limitation of storing drawing files in SharePoint.
When a user navigates to a library, and selects a DWG file, the file opens in the AutoCAD preview app in the browser. (fig 1 and fig 2)

Fig 1 – SharePoint Library containing dwg files

Fig 2 – AutoCad preview from SharePoint Library
Unfortunately, SharePoint Search still does not open AutoCAD drawing files in the preview app. When the user clicks on a dwg result, the default experience if for the file to download (fig 3)

Fig 3 – AutoCad files are downloaded by default from SharePoint Search
We recently worked with a client who relies heavily on search, and AutoCAD files. By implementing a custom display template we were able to override the path url using the following code:
ctx.CurrentItem.Path = ctx.CurrentItem.ParentLink + “?id=” + ctx.CurrentItem.DefaultEncodingURL.replace(“https://tennantname.sharepoint.com”,””) + “&parent=na&parentview=7”;
Now when a user searches for a dwg file, and clicks on the result, they are taken to the AutoCAD preview app in the browser (fig 4 and fig 5).

Fig 4 – Search results after display template updated

Fig 5 – Search Preview after display template updated
If you store AutoCAD drawings in SharePoint and would like help to implement this in your SharePoint search site(s) then get in touch today for a free consultation.
Comments
백링크 said: "whoah this blog is wonderful i like studying your articles. Keep up the good work! You recognize, many persons are hunting round for this info, you can help them greatly.".
토닥이 코스 said: "Hi, just wanted to say, I enjoyed this article. It was practical. Keep on posting!".
백링크 said: "Hello! Someone in my Myspace group shared this site with us so I came to look it over. I'm definitely loving the information. I'm book-marking and will be tweeting this to my followers! Superb blog and terrific style and design.".
여성전용마사지 said: "Fantastic web site. A lot of useful information here. I am sending it to some pals ans also sharing in delicious. And obviously, thanks in your sweat!".
구글상위노출 said: "Have you ever thought about publishing an e-book or guest authoring on other blogs? I have a blog centered on the same subjects you discuss and would love to have you share some stories/information. I know my audience would enjoy your work. If you are even remotely interested, feel free to send me an e mail.".
토닥이 said: "You really make it seem so easy with your presentation but I find this matter to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I'll try to get the hang of it!".
youtube mp3 said: "Hi! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a wonderful job! Look at my page - youtube mp3".