System.Reflection.Assembly currentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { if (isFirstRun) { if (REXEnvironment.Current == null) { Autodesk.REX.Framework.REXEnvironment Env = new Autodesk.REX.Framework.REXEnvironment(); } Autodesk.REX.Framework.REXAssemblies.AssembliesPaths.Add(REXEnvironment.Current.GetPath(REXEnvironment.PathType.Engine, "Revit")); Autodesk.REX.Framework.REXAssemblies.Resolve(sender, args, GetType().Assembly); isFirstRun = false; } return(Autodesk.REX.Framework.REXAssemblies.Resolve(sender, args, GetType().Assembly)); }
/// <summary> /// Fills the header note. /// </summary> private void FillHeaderNote() { Autodesk.REX.Framework.REXEnvironment Env = new Autodesk.REX.Framework.REXEnvironment(REX.Common.REXConst.ENG_DedicatedVersionName); string path = Env.GetModulePath(Autodesk.REX.Framework.REXEnvironment.PathType.Configuration, ThisExtension.ThisApplication.Context.Name); string imagePath = REX.Common.REXController.GetProductBitmapFullPath(ThisContext, ThisExtension.GetREXEnvironment(), (REXInterfaceType)ThisExtension.ExtensionContext.Control.StandardOwner, false); string ModVersion = ThisExtension.ThisApplication.GetType().Assembly.GetName().Version.Major.ToString() + "." + ThisExtension.ThisApplication.GetType().Assembly.GetName().Version.Minor.ToString(); string createHeader = "<table border = 1 style = \"border:#eeeeee\" width =\"100%\">" + "<tr height=\"40\">" + "<td rowspan = \"4\" align=\"center\" valign=\"center\" width = \"10%\" style = \"border: 1px solid #eeeeee\"><img src=\"" + imagePath + "\"" + "</td>" + "<td align=\"left\" valign=\"center\" width = \"90%\" bgcolor = \"#eeeeee\" style = \"border: 0px solid #eeeeee\" >" + "<font size = 4 face=\"Arial\">Element Report</font></br>" + "</td>" + "</tr>" + "<tr height=\"20\">" + "<td align=\"left\" valign=\"center\" width = \"90%\" bgcolor = \"#eeeeee\" style = \"border: 0px solid #eeeeee\" >" + "<font size = 1 color = \"gray\" >REXSDK 2012</font></br>" + "</td>" + "</tr>" + "</table>"; HtmlDocument.Body.AddLine(createHeader); HtmlDocument.Body.AddLineBreak(); }