This is Philippe Leefsma's Typepad Profile.
Join Typepad and start following Philippe Leefsma's activity
Philippe Leefsma
Switzerland
Philippe has a master's degree in Computer Sciences. He carried his studies in Paris at I.S.E.P and in USA, at Colorado School of Mines. He joined Autodesk 5 years ago where he works as developer consultant for Autodesk Developer Network. He supports various products APIs such as AutoCAD®, AutoCAD Mechanical®, and Autodesk® Inventor®. He likes to travel, meet developers from around the world to work with them around challenging programming, CAD and manufacturing topics.
Interests: Hiking, swimming, climbing, snowboarding and travelling
Recent Activity
Hi there, I wrote the article a while ago and since then I didn't used NDK much but yes, that syntax seems to be the way to import constructor. See there for more details: https://stackoverflow.com/questions/9286661/calling-a-constructor-fails-in-jni-android
Android NDK: Passing complex data between Java and JNI methods
By Philippe Leefsma Here is the definition of the NDK from the Android SDK documentation: The NDK (Native Development Kit) is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can be helpful so you can reuse ex...
Should be WCS, just check what's going on in MGHLCOIN command.
A simplified .NET API for accessing AutoCAD parameters and constraints
By Philippe Leefsma This post is an updated version of Kean's post about the simplified constraint API we developed a while ago. At the time we posted it, this AutoCAD DevBlog wasn’t existing yet, so the reason why I’m posting that myself today is because, being the main author of that library, ...
Hi David,
This lib is gracefully provided to you as a sample code, may you need a version for 2015/2016, you would need to build it yourself from the source.
A simplified .NET API for accessing AutoCAD parameters and constraints
By Philippe Leefsma This post is an updated version of Kean's post about the simplified constraint API we developed a while ago. At the time we posted it, this AutoCAD DevBlog wasn’t existing yet, so the reason why I’m posting that myself today is because, being the main author of that library, ...
Hi Jeff,
The Ribbon API is .Net only, so there is no way to access it from C++.
Detecting Tab Activated Event in the Ribbon
By Philippe Leefsma I was recently working on an ADN case where the developer wanted to react to his custom tab being activated. The Inventor Ribbon API itself doesn’t provide this kind of notification, however the underlying Ribbon API does. You need to add a reference to AdWindows.dll (located...
Sorry I'm not a Selenium expert, if you have specific questions about using Selenium IDE, you may seek support directly with them.
Automated browser testing with Node.js + Selenium
By Philippe Leefsma SeleniumHQ is a free set of tools and APIs that allow you to simulate user actions in a browser, locate html elements such as buttons, inputs, send clicks and so on... This is what our development team is using, among other tools, to automate tests with the viewer. I gave a q...
Not as far as I know... this method is quite reliable, although a bit verbose.
Accessing visible entities in a dynamic block
By Philippe Leefsma Here is a question once posted by an ADN member: How do I access the list of visible entities for a specific visibility state in a dynamic block that contains a visibility parameter? The following solution is a code sample based on a suggestion proposed by Tony Tanzillo in...
That's thrown by the line in Markup3DExtension.contructor:
this._viewer.toolController.registerTool(
this.markup3DTool)
Try loading the extension in GEOMETRY_LOADED_EVENT ...
Markup3D Sample for View & Data API
By Philippe Leefsma (@F3lipek) Here is a reworked version of one of my early sample for View & Data API: This illustrates how you can create markups pointing to a specific point on your model. The main feature is that the markups display a 2D symbol on the canvas and is hooked up to camera event...
You have to add the polyfill on top of your app, not on top of Viewing.Extension.Markup3D.js or any other files from my library.
This error is definitely caused by an improper loading of the polyfill. It has to be loaded before any other script with has been transpiled.
Markup3D Sample for View & Data API
By Philippe Leefsma (@F3lipek) Here is a reworked version of one of my early sample for View & Data API: This illustrates how you can create markups pointing to a specific point on your model. The main feature is that the markups display a 2D symbol on the canvas and is hooked up to camera event...
No worries, you need to include babel-polyfill script or package (depending if you are using webpack in your app) before any babel transpiled code:
https://babeljs.io/docs/usage/polyfill/
Regards,
Philippe.
Markup3D Sample for View & Data API
By Philippe Leefsma (@F3lipek) Here is a reworked version of one of my early sample for View & Data API: This illustrates how you can create markups pointing to a specific point on your model. The main feature is that the markups display a 2D symbol on the canvas and is hooked up to camera event...
What happens if you use the same version of the viewer than the extension?
https://autodeskviewer.com/viewers/2.2/viewer3D.min.js
Playing with the new View & Data - Markup API
By Philippe Leefsma (@F3lipek) The latest release of the viewer API is coming with a 2D markup feature that allows you to draw svg shapes on top of your 2d/3d models, potentially save the markup information you created and restore them at a later time. There is a tutorial here that illustrates t...
Which version of the viewer API are you using? My live demo is using 2.2 and it works fine. Also did you include the markup script as mentioned in my article?
https://autodeskviewer.com/viewers/2.2/extensions/MarkupsCore.min.js
Here is the demo:
http://viewer.autodesk.io/node/gallery/embed?id=5502100f75464da00d7c4cb0&extIds=Autodesk.ADN.Viewing.Extension.Markup
Philippe.
Playing with the new View & Data - Markup API
By Philippe Leefsma (@F3lipek) The latest release of the viewer API is coming with a 2D markup feature that allows you to draw svg shapes on top of your 2d/3d models, potentially save the markup information you created and restore them at a later time. There is a tutorial here that illustrates t...
Most likely you are not waiting for the following events to fire when you load your model so the instanceTree has not been loaded yet:
Autodesk.Viewing.GEOMETRY_LOADED_EVENT
Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT
Take a look at this post:
http://adndevblog.typepad.com/cloud_and_mobile/2015/08/asynchronous-viewer-events-notification.html
There is no better documentation, I think that blog and the forum should address most of the topics. You can also post your questions on the forum if you are stuck, we will address them: http://forums.autodesk.com/t5/cloud-services/ct-p/94
You can simply do console.log(model.getData()) to see what is returned by this method and ultimately looking at the source code: https://autodeskviewer.com/viewers/2.5/viewer3D.js
Breaking change in accessing model instance tree with View & Data API
By Philippe Leefsma (@F3lipek) The latest release of the viewer available at https://autodeskviewer.com/viewers/2.5/viewer3D.min.js is unfortunately introducing a breaking change in the way you have to access the model structure. The migration is rather straightforward but any code you have in y...
Thanks. The BLE is definitely clunky... what I noticed is that if fails to connect, I use the App from my phone to connect to BB8, then try again with the API and it works fine.
I wrote a 2nd part to that tutorial that you may want to check:
http://adndevblog.typepad.com/cloud_and_mobile/2016/02/integrating-sphero-bb8-droid-with-view-data-api-part-ii.html
Hope that helps,
Philippe.
Integrating Sphero BB8 Droid with View & Data API - Part I
By Philippe Leefsma 2016 will likely be the year of IoT and after Christmas the new cool kid in town is definitely the Sphero BB8 bluetooth controlled Droid! So walking in Kean's footsteps who controls that robot from AutoCAD, I decided to have a play with it and integrate it with our View & Dat...
The full project is attached to that post, just download the zip and take a look...
Android NDK: Passing complex data between Java and JNI methods
By Philippe Leefsma Here is the definition of the NDK from the Android SDK documentation: The NDK (Native Development Kit) is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can be helpful so you can reuse ex...
I don't think you can do this from the JavaScript API, you would need to use the C++ or .Net API inside AutoCAD to achieve that. Getting the vertices from .Net is fairly straightforward: http://through-the-interface.typepad.com/through_the_interface/2007/04/iterating_throu.html
You could load a custom .Net dll in AutoCAD that expose a toolkit of features and invoke that from js. There is an example in that material that illustrates calling .net from js.
Hope that helps
Philippe.
Getting Started with JavaScript API on AutoCAD 2014
By Philippe Leefsma As you may have seen already, AutoCAD 2014 is coming with a brand new JavaScript API that will allow a new wave of programmers to interact with it. Whether you are an experienced web developer or a complete newbie in that area, this DevTv will take you through the steps requi...
You can use the following url to get viewer api and styles, the version number is now directly part of the url, so no need to specify it with ?v=vxxx
https://autodeskviewer.com/viewers/2.5/viewer3D.min.js
https://autodeskviewer.com/viewers/2.5/style.css
Always use versioning
By Adam Nagy Each time a new version of the viewer comes out it provides some new functionality that you can take advantage of. Unfortunately, sometimes in order to implement those, certain things need to be reorganised and those changes might break your code. The way to avoid your web app being...
I don't think Revit has a COM API, but I'm not a Revit expert so you may want to ask this kind of questions on... a Revit forum:
http://forums.autodesk.com/t5/revit-api/bd-p/160
Regards,
Philippe.
Accessing COM applications from the Running Object Table
By Philippe Leefsma Here is a topic that comes up every now and then: how do you access a specific instance of a COM application if several instances are running with a similar ProgId? The GetActiveObject(progId) approach can only return a single object, so there is no way to differentiate or se...
Hi Ranjan,
Your question has nothing to do with the topic of this post, in the future please use the forum to ask this kind of questions:
http://forums.autodesk.com/t5/inventor-customization/bd-p/120
Here is a post about using WPF in an Inventor Dockable Window:
http://adndevblog.typepad.com/manufacturing/2012/06/embedding-a-wpf-user-control-in-a-dockablewindow-in-inventor.html
If you want to display a WPF form inside Inventor which is not contained inside a dockable dialog, you can just simply show your dialog, nothing specific to Inventor.
Complete ClientFeature example in C#
By Philippe Leefsma The attached sample add-in exposes an example of handling a fully functional ClientFeature including the following functionalities: Creation through InteractionEvents, edit, double-clicked event, associated ClientGraphics. I wrote this add-in upon request for a customer, so i...
Hi Raj,
That article was produced 2 years ago, it was using a sample service provided by SAP, so I would expect this service is not available anymore.
In any case you will have to use your own SAP credentials if you want to run the demo on your side. You will first need create an account on the SAP developer center and then get the latest tools in order to use the Netweaver technology:
http://scn.sap.com/community/developer-center
Integrating SAP with Autodesk products using SAP NetWeaver Gateway
By Philippe Leefsma I’ve been in the past few months playing around with a recent technology from SAP, the market and technology leader in business management software, that they called SAP NetWeaver Gateway. The main idea is to provide a framework and a set of tools that will allow programmers...
Hi Marco, I checked in our database, unfortunately this behavior is a known issue and it hasn't been fixed yet. You won't be able to restore the controls from a custom add-in after unload/reload unless you reset the ribbon.
Sorry for the bad news.
Design Patterns applied to the Inventor API
By Philippe Leefsma Here is the complete content of one of my AU 2012 class dealing about design patterns and let’s say tips & tricks or good practices when it comes to developing Inventor add-ins. Developing add-ins in general, but especially Inventor ones since it is our focus here, has this ...
Cool, my colleague wrote a post about integrating the viewer in sharepoint, if that may help: http://adndevblog.typepad.com/cloud_and_mobile/2014/07/integrate-viewer-with-sharepoint.html
Also feel free to send your viewer-related questions to the dedicated section of the forum:
http://forums.autodesk.com/t5/view-and-data-api/bd-p/95
Have a nice weekend;)
WebGL VR Effects with three.js
By Philippe Leefsma This week post features some cool three.js effects that you can easily use to do VR. Two VR effects are now shipped out of the box with that great WebGL library: - An Occulust Rift effect - A Stereo Effect They are pretty easy to apply to any standard three.js WebGL scene, al...
Well... basically when using an iframe you have no control over the client side JavaScript API, so there is no way to customize an embed from A360. If you want customization, you need to setup your own page where you can use the viewer API. Also this approach only applies to pure webgl renderers, however the development team is working on providing similar features for the viewer and we are definitely going to play with anything that is VR-related... just keep watching the blog for some news.
Hope that helps,
Philippe.
WebGL VR Effects with three.js
By Philippe Leefsma This week post features some cool three.js effects that you can easily use to do VR. Two VR effects are now shipped out of the box with that great WebGL library: - An Occulust Rift effect - A Stereo Effect They are pretty easy to apply to any standard three.js WebGL scene, al...
This does not require having an A360 account, no login on the page...
Drag and Drop file viewing
By Adam Nagy In the past when you got a design data file then you had to figure out what product you could use to view it: http://usa.autodesk.com/support/viewers/ Now, if you have an A360 account then you can simply drag and drop the file onto the following webpage and see the model: https://36...
Do you have any geometry in your model? Are you sure that model is null or is it the result "root"?
This code only works for 2d drawings, getLayersRoot return null for 3d models...
View & Data API: Working with layers
By Philippe Leefsma Here is a quickie for the weekend. The following code illustrates how to iterate all the layer groups and their child nodes, then how to isolate a specific layer based on its name similarly to a user clicking on that layer from the Layers panel in UI. Below is the signature o...
Hi Madhu,
That's a good start;) Using canvas directly is pretty low-level. Implementing a game on that would be like coding in assembly... You may want to take a look at 2d libraries like http://g.raphaeljs.com/ or http://paperjs.org/ which are making life much easier!
Absolute Simple Canvas Game
By Madhukar Moogala This is my first blog in C&M, for sometime now I was exploring myself to understand HTML/JS/CSS,I read and got comfort my self with basic language semantics, but what now, out of abundant resources on web I was at crossroads and not sure where to start,then something struck ...
More...
Subscribe to Philippe Leefsma’s Recent Activity