JavaScript
-
As promised in yesterday's post, here's my first attempt at writing a simple JavaScript app for AutoCAD. This app is purely JavaScript – no HTML to be seen, anywhere – and implements a command inside AutoCAD that will zoom to the extents of an entity selected by the user. Let's start by looking at the source code, which has been posted here. // Command to zoom to the extents of a selected entity function zoomEntity() { try { // Set the options for our user prompt var peo = new Acad.PromptEntityOptions(); peo.setMessageAndKeywords("\nSelect an…
-
Today is the official launch of 2014 family of products. AutoCAD 2014 will be available in the coming days to customers around the world. You'll no doubt find lots of information on the interwebs regarding the product's features, so I'm going to focus specifically on the opportunities – and requirements – the new release presents to developers. Firstly, ADN members should refer to the (as ever) thorough information produced by the DevTech team and posted under the "Events" section of the ADN website. I expect the AutoCAD DevBlog will be making much of this available to a broader audience over…
-
After my initial (only partially successful) attempt, earlier in the week, to get 3D geometry from the Apollonian web-service into a PointCloud Browser session, I finally managed to get it working properly. Given the currently fairly light documentation available – especially for the Viper JavaScript namespace which gives access to the 3D rendering capabilities in the browser – I ended up posting a question to the PointCloud forum. The answer was very instructive – I was able not only to get spheres of different radii displayed using the same mesh… … but also to apply different colours to the same…
-
I first became aware of the work being done by 13th Lab a couple of years ago, but just last week someone pinged me about it again and re-triggered my interest (thanks, Jim :-). 13th Lab is a small Swedish company that has created some really interesting Augmented Reality technology. Many AR systems make use of fiduciary markers (which often look like sections of QR codes) to make it easier to determine where the 3D content should be positioned and visualized in the 2D image of the scene being fed from your device's camera. Ideally, though, you want a markerless…
-
After introducing the topic – as well as creating our basic, local web-service – in the last post, today we're going to publish our MVC 4 Web API application to the cloud and see it working from a number of different client environments. Preparing to publish to Azure Now that we're ready to publish to Azure, we need to add a deployment project to our solution. Right-click "ApollonianPackingWebApi" in the Solution Explorer and select "Add Windows Azure Cloud Service Project". This will add a new project into our solution. We can now double-click the entry under the "Roles" folder in…
-
I touched on this subject a few weeks ago in part 2 of my DWF-related AU handout, but thought I'd come back and describe in more depth some of the fun (although a more accurate word might be "difficulty" 🙂 I had solving this problem. I've been playing around with web services and XML since SaaS was still known as ASP, and have tried to stay up-to-date with the technology as best I can. I'm really a client-side programmer, all things considered: I've created some server-side code, but have mostly involved myself with desktop-oriented programming and creation of samples that…
-
[This post continues from part 1 of this series. The source for the below applications is available here: DWF Toolkit application source, Design Review application source & Freewheel application source.] Mining the data with the DWF Toolkit Now we're going to look at using the DWF Toolkit – the freely available, cross platform toolkit for creating and reading DWF files – to extract the "identity" and "material" metadata associated with our geometry. The DWF Toolkit is a C++ toolkit, so we have two components to our project: A C++ DLL that uses the DWF Toolkit to read a DWF, storing…