2015
-
This question came in as a blog comment on this previous post: Is possible to use Revision Cloud in this situation? Example: Creating a polyline/circle/ellipse then make it a revision cloud. It seemed to make sense to broaden the topic for the purposes of this blog post: how to pass an entity or entities to an AutoCAD command called via Editor.Command() or CommandAsync(). Since Editor.Command() was implemented in AutoCAD 2015, I've been a fan of the calling commands in AutoCAD application code. But I haven't actually covered the approach needed to send object information to commands via this function. Yes,…
-
This interesting question came in by email from Igor, over the weekend: Let say I want to delete a layer by it's name. I can get ObjectId or LayerTabelRecord from the name, like LayerTable tLayers = (LayerTable) Transaction.GetObject(Database.LayerTableId,OpenMode.ForRead,false) LayerTableRecord ltRecord = (LayerTableRecord) Transaction.GetObject(tLayers.Item[Name],OpenMode.ForWrite,false); Now having LayerTableRecord how can I found out that this DBObject is not the built-in one? Like names '0' or 'DEFPOINTS'. Same goes for TextStyle (STANDARD) or layout (MODEL)….? I can't found any property regarding this, like IsBuiltIn. The IsPersistent property is no help. It's true that there isn't an IsBuiltIn property on AutoCAD objects… for block…
-
After the last post, where we looked at the first couple of architecture iterations for Jigsawify.com, it's time to summarise (and perhaps even wrap-up) this series… Here are the posts so far: Puzzling over laser cutters AutoCAD I/O and custom applications Finishing up our laser-cut jigsaw project Running custom .NET code in the cloud using AutoCAD I/O – Part 1 Running custom .NET code in the cloud using AutoCAD I/O – Part 2 Running custom .NET code in the cloud using AutoCAD I/O – Part 3 Running custom .NET code in the cloud using AutoCAD I/O – Part 4 Architecting…
-
As mentioned in this recent post, I've been working on my AutoCAD I/O-driven web-site on and off for the last few weeks. Lately I've had to think beyond certain assumptions I'd made about its architecture, and I thought it worth sharing those thoughts here. The intention of the site is that you upload an image and then see some edge detection get performed on it, generating an engraving layer for a custom jigsaw puzzle. AutoCAD I/O gets used to generate a drawing that can drive a laser cutter, creating your 100% unique jigsaw puzzle. Basically making the world a better…
-
Here's an interesting question that came in from Nick Gilbert via a blog comment: Is there a simple way to get the geometric extents of the group? As discussed in this previous post, the Group object in AutoCAD presents itself as a collection of geometric objects (or entities, in ObjectARX-parlance). But a Group, in itself, isn't a geometric object: it's an aggregator of objects that are. So there isn't – as Nick is clearly aware – a simple GeometricExtents property of the Group object. But we can access the contents of the Group and combine their various GeometricExtents, returning an…
-
I've been trying hard to keep up my blogging rhythm, through the summer, but some weeks it's just hard. I'm currently enjoying an extended staycation with the family – and the weather in Switzerland has been simply amazing, this year, thankfully – and this week I just haven't found the time for my usual 3rd post. So here's a quick photo of a local field of sunflowers. Happy summer, everyone!
-
I've been working with AutoCAD I/O quite heavily over the last week or two – mainly spending time fleshing out my Jigsawify web application well in advance of AU2015 – and came across this helpful trick for visualizing an OData-based REST API graphically: you can copy and paste the XML schema for the AutoCAD I/O API into a file and then load it into the handy XOData tool. Here's what was generated (after a little editing from my side for layout): I'm making pretty good progress using AutoCAD I/O from Node.js – which is interesting as I can now run…
-
Today's post resulted from an internal discussion: Miroslav Schonauer – with the help of Jan Liska – put together some code for a recent consulting engagement that they felt was important to share with the community. They wanted to test point containment for a particular 3D solid, but also to test whether the selected point – if outside the solid – was above it. They achieved this using AutoCAD's Brep API. Here is the C# they put together (with some minor, cosmetic edits from my side): using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.BoundaryRepresentation; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; using Autodesk.AutoCAD.Runtime; using System;…
-
While my last post on tables was apparently interesting, it turns out it didn't actually address the question that inspired it. Oh well. Here's a recent comment that gave greater clarity on the requirement: Do you know those no smoking signs commonly seen in public places: a cigarette with a red cross struck through it. Can a similar thing be done programmatically in a table with the strike through happening through a number. A picture is worth a 1000 words: http://imgur.com/gallery/qPzEm... In other words, can a block be inserted into a particular cell which already contains a number value? side…
-
I've just received an email from one of our in-house recruiters listing a number of open software development positions. I thought it was a good time to share some of these with this blog's readers, partly because people may be interested in applying, but also to shine a light on the fact Autodesk hires coders in lots of different locations. When people email or ask me about positions at Autodesk, I typically suggest they visit our careers page. This provides access to a handy tool listing the various positions open across the company: at the time of writing there are…