This is Matthias's Typepad Profile.
Join Typepad and start following Matthias's activity
Matthias
Recent Activity
Hi Jeremy, Hi followers,
I'm coding a tool to manage Links to dwg-drawings. One 'routine' Links the dwg files to our Revit model using this Revit-API method:
Document.Link(string file, DWGImportOptions options, View pDBView, out ElementId elementId)
Since Revit 2015 there exists a new ImportOption 'AutoCorrectAlmostVHLines'. This Option can be set via a flag using API commands. I thought this should reflect the behavior of the standard dwg-Import dialog, but the Lines are always adapted to the xy-Grid. Even this method auto corrects.
private ElementId importFile(string file_name, DWGImportOptions opt) {
ElementId e_id = null;
opt.AutoCorrectAlmostVHLines = false;
Transaction t = new Transaction(doc, file_name + ";import dwg");
t.Start();
doc.Link(file_name, opt, doc.ActiveView, out e_id);
t.Commit();
//Element dwg_file = doc.get_Element(e_id);
return e_id;
}
In Version 2013 this auto correct did not exist, so the we just got awre of this. Did anyone else face such problems or does anyone have a good idea how to fix this?
I use Built: 20150127_0715(x64)-Update Release 6
Thnx in advance, Matthias
Adding a Shared Parameter to a DWG File
I was recently asked whether it is possible to attach a shared parameter to a DWG drawing file imported into a Revit model. The exploration of this issue was interesting enough for me to like to share it. First of all, if you are interested in attaching a shared parameter to Revit elements, ther...
Matthias is now following Spiderinnet
Oct 31, 2014
Hi,
in the code to read back the data from the Element, a Transaction is used. I'm wondering if this is really neccessary. I dont see writing access to Revit.
I hope it is not neccessary, because starting a Transaction can be tricky in some cases,,,
Revit API 2012: Extensible Storage – Revit Element Data Extension
The Revit API 2012 provides an official way to extend the Element data now. In the old days, we could only create some cumbersome invisible parameters and attach them to the elements where we want to store some extra data. Now the Extensible Storage API can directly address so basic a need for u...
I guess we all did anyway, although it was an illegal call. It will cost thousands of dollars to develop new behaviors, just to make my beloved tools work as they did in Revit 2013. Lets get it on.
Revit 2015 and Updated SDK Released
Here is just a quick note to tell you that Revit 2015 was released today, and you can now download it from the Autodesk Revit product site. The Revit 2015 SDK (Software Developers Kit) is also available from the Revit developer center. Please note that is was updated today, to replace a previou...
Subscribe to Matthias’s Recent Activity