This is Matthias's Typepad Profile.
Join Typepad and start following Matthias's activity
Join Now!
Already a member? Sign In
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
1 reply
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,,,
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.
1 reply