Highlighted
ReganM Absent Member.
Absent Member.
1418 views

Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Properties

Hi,

 

I'm currently developing an ASP.Net website with a custom front end - I would like users to be able to return a list of TRIM Records, select a link and allow either Trim Viewer or the associated application to launch. I would also like the Record Properties to be visible when another link is selected.

 

I've had issues (potentially related to using .Net 4.5 and the Trim Viewer Active X COM Type Library - adding the assembly causes an error).

 

Is there a recommended way to get these to occur? I'm currently utilising Trim 7.2 Web Services and .Net SDK - everything else I need appears to work fine.

 

Can I create my own ActiveX object for the trim viewer? Is that an alternative?

Tags (1)
0 Likes
5 Replies
Matt Bayliss Super Contributor.
Super Contributor.

Re: Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Propertie

Hello there,

 

For running the TRIM Viewer on the client you will need something like an ActiveX control (although we've had some trouble with Internet Explorer 10 with ActiveX controls referencing the TRIM SDK), or, seeing as you don't need any response sent back to the page, perhaps a custom protocol might serve you better? The bonus is that it's browser independent.

 

setting up a custom protocol: http://msdn.microsoft.com/en-us/library/aa767914%28VS.85%29.aspx

 

A custom protocol will be a simple console app - so if the protocol is reganm, and the record uri is 123, you could put a link like <a href="reganm:view/123">record</a> on your page (or reganm:properties/123 for viewing TRIM properties). Clicking it will launch the console app you registered, and by splitting out the passed in argument of "reganm:edit/123" you can show the TRIM viewer (or native app, depending on user preferences set in the TRIM client):

 

static void Main(string[] args)
{
	using (Database trim = new Database())
	{
		//by not setting trim.Id, workgroupServer etc, it connects to user's default TRIM dataset
		
		// get the uri from the args passed in, ie args[0] == "reganm:view/123"
		using(var record = new Record(trim, 123)) {

			// IntPtr.Zero sets the window's parent to the desktop
			
			// Showing the properties screen
			bool changesmade = HP.HPTRIM.SDKUI.PropertyEditor.EditModal(IntPtr.Zero, record);
			
			// opens the record in the TRIM viewer or native app, depending on user's TRIM options
			HP.HPTRIM.SDKUI.ObjectViewer.ViewModal(IntPtr.Zero, record);
		}
	}
}

 

 

 

Hope that helps,

 

Matt.

0 Likes
Absent Member.. Ralf_Wegener Absent Member..
Absent Member..

Re: Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Propertie

Have you considered using HP TRIM Webclient (previewing, downloading, metadata-properties) in combination with restful calls from your asp.net app for consumption?.

**My opinions are my own personal opinions.


kapish.com.au
0 Likes
ReganM Absent Member.
Absent Member.

Re: Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Propertie

Thanks for the advise I will look at setting up a protocol to allow the information to be viewed. Thanks for your assistance.

 

Unfortunately the web client is not installed or configured here - so it maybe difficult to get that started.

 

 

0 Likes
Absent Member.. Ralf_Wegener Absent Member..
Absent Member..

Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Properties

Web Client is zero foot print. ActiveX is Fat Client. Takes 2 minutes to install web client. It takes time, effort and resources to integrate fat client approach... many dependencies to deploy HP TRIM on every desktop.


**My opinions are my own personal opinions.


kapish.com.au
0 Likes
ReganM Absent Member.
Absent Member.

Re: Trim 7.2 - Open Trim Viewer or the associated application for Electronic Record / View Propertie

HI,

 

So does the Console application then need to 'sit' on the Server or the client? 

 

I would prefer something that runs on the server or uses the existing HP Trim Software - I was looking at ActiveX because the HP Trim Client is already rolled out here. Any thoughts on how to use Active X?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.