Hi Vinod,

 

I did the following, it works fine. In this case, since I queried for
list of filter guides upfront, I am simply assigning GetContainer
returned reference directly to a FilterGuide type variable. 

      nameList = server.GetListFilterGuide()

      For Each name As String In nameList

         Dim fg As BMC.ARSystem.FilterGuide

         fg = server.GetContainer(name)

         System.Diagnostics.Debug.WriteLine(name + "(" + fg.Name + ")")

         System.Diagnostics.Debug.WriteLine(name + "(" +
fg.Items.Count.ToString + ")")

      Next

 

If you are simply working at containers level, in which case, you do not
quite yet know what the returned container's actual type be - then you
need to look for the type of the object and cast as needed...

         Dim con As BMC.ARSystem.Container

         con = server.GetContainer(name)

         If TypeOf con Is BMC.ARSystem.FilterGuide Then

            fg = con

         End If

 

Regards

Appajee

 

 

 

 

 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Heider, Stephen
Sent: Thursday, May 24, 2007 4:38 AM
To: arslist@ARSLIST.ORG
Subject: Re: How to Get the Definition of a Filter Guide using .NET API

 

Vinod,

 

I just started a new VB.Net project that gets the FilterGuide and
ActiveLinkGuide definitions via the .Net API.  I am not at my
development computer right now, but I think what you may need to do is
convert the type of the Container Object to a FilterGuide object using
CType().  Here a code snippet (untested).

 

-------------

Dim x As BMC.ARSystem.FilterGuide
Dim ars As New BMC.ARSystem.Server

ars.Login("servername", "Demo", "secret")
x = CType(ars.GetContainer("FilterGuideName"), BMC.ARSystem.FilterGuide)

-------------

 

Hope this points you in the right direction.

 

Stephen

 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Vinod Kumar
Sent: Thursday, May 24, 2007 2:38 AM
To: arslist@ARSLIST.ORG
Subject: How to Get the Definition of a Filter Guide using .NET API

** 

Hi Listers, 

I am working on creating an interface in VB.NET, which accesses the
Remedy Objects.  I am using the .NET API's available at the BMC website.

 

WHen i try to access any Filter Guide using the GetContainer(ObjectName)
method, the code considers the ObjectName to be an ActiveLink and tries
to get the definition of an ActiveLinkGuide instead of a FilterGuide,
ending up in displaying an error saying that there is no ActiveLinkGuide
with the name ObjectName. 

 

I understand that the containerType value needs to be changed for each
of the Guides, but i could not find out where i could change the default
container type value.

 

Please throw some light on how to go about, with this issue.

 

Thanks and Regards,

Vinod

 

__20060125_______________________This posting was submitted with HTML in
it___ 

__20060125_______________________This posting was submitted with HTML in
it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to