- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
First off, I seem to recall that there was a vote to have a Fabrication API forum. Would still love to have that available to us as we use it more and more. So I apologize if there might have been a better place to post this.
I am writing a Fabrication API Add-In for CAM and CAD, and I've reached a point where I need to read the item's Cut Type value. In the old MAP scripting, it was as easy as item.cuttype. And I even seem to recall this value being present in Revit's Fabrication Parts. But it does not seem to be present in Fabrication API for 2016. Is this correct? And can we change that?
In the assumption that this is not possible to achieve in 2016 (at least) from the Item itself, I've started looking into a way to see this value feeding my .NET addin with information coming from the old scripting language. So it needs to happy asynchronously so that it can give me the info and my addin can work with that.
Editor.CommandAsync does not seem to like the execute script command, so it appears I am left with the Interop SendCommand.
var adoc = Application.DocumentManager.MdiActiveDocument.GetAcadDocument();
(adoc as AutoCAD.AcadDocument).SendCommand("EXECUTESCRIPT\n\"C:\\test\\debug_cuttype.cod\"\n");With this approach, even with FILEDIA set to 0 and this location set to my trusted locations, I still get a prompt to browse to the script, which I more or less expected but had to try. Even should I get around that, I'm curious how I'll receive the result other than a dialog.
Any thoughts on how to proceed here?
Solved! Go to Solution.