Please enable JavaScript to view this site.

Altova UModel 2022 Professional Edition

Loads the .NET assembly with the given long assembly name or file path. Returns Boolean true if the assembly could be loaded; false otherwise.



CLR.LoadAssembly(strAssemblyNameCLR : String, showLoadErrors : Boolean) -> result : Boolean



The following JScript code attempts to set the clipboard text by loading the required assembly dynamically.


// set clipboard text (if possible)
// System.Windows.Clipboard is part of the PresentationCore assembly, so load this assembly first:
if ( CLR.LoadAssembly( "PresentationCore, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35", true ) )
   var clipboard = CLR.Static( "System.Windows.Clipboard" );
   if ( clipboard != null )
       clipboard.SetText( "HelloClipboard" );

© 2016-2022 Altova GmbH