Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 12
Registered: ‎10-14-2015
Accepted Solution

How to get user login in Offline Mode ?

Hi All,

 

I had an attribute in OFFLINE form, required to auto fill up with user login user's name/id during form load,  can i get value from IG Javascript?  or have to write a custom plugin script to call ? 

 

Please advise.

 

Thanks & Regards,
Cath.

 

Contributor
Posts: 28
Registered: ‎11-04-2015

Re: How to get user login in Offline Mode ?

Occasional Contributor
Posts: 12
Registered: ‎10-14-2015

Re: How to get user login in Offline Mode ?

Hi Lukas,

 

thanks for the prompt reply, but unforcunately when I click on the link (with login), it say "Sorry, but this topic is no longer available."

 

 

Thanks & Regards,
Cath.

Technical Evangelist
Posts: 527
Registered: ‎09-11-2015

Re: How to get user login in Offline Mode ?

[ Edited ]

The topic does exist for me. Strange ...

 

But it is internal forum, so it is invisible outside Intergraph.

 

Pavel

Highlighted
Contributor
Posts: 28
Registered: ‎11-04-2015

Re: How to get user login in Offline Mode ?

Copy from the forum

 

this is the solution by using GeometryChangeHandler

 

{

      

        public void OnGeometryChanging(GeometryChangingContext changingContext)

        {

 

            foreach (Intergraph.Emea.SmartClient.Data.GeometryMetadata geometryToChange in changingContext.Geometries)

            {

            

            Site gmscSite =  SmartClientAppSettings.GetSite("GMSC");

             using (ISessionProvider sessionProvider = new SessionProvider(gmscSite.ConnectionString,                                                                           DBProviderTypeResolver.FromType(gmscSite.ProviderName)))

            {

                SessionState session = sessionProvider.Fetch(changingContext.SessionId);

                geometryToChange.Attributes["USER_NAME"] = session.Get("UserName").ToString();

              

            }

    }

          

        }

 

        public void OnGeometryChanged(GeometryChangedContext context)

        { }

    }

Occasional Contributor
Posts: 12
Registered: ‎10-14-2015

Re: How to get user login in Offline Mode ?

Hi,

 

The code given is .NET ...calling .net object only when ONLINE, as far as I know GMSC,  if we have to get the Login ID during Offline the ONLY possible way is either to get the value from IG Javascript or get from JAVA Plugin (custom query from h2 database) ? 

 

May I know is that possible to get the user logon ID during OFFLINE itself? If Yes, how to call?

 

 

regards,
Cath.

 

 

Occasional Contributor
Posts: 9
Registered: ‎10-13-2015

Re: How to get user login in Offline Mode ?

Hi everyone,

 

Any update on this subject? I have the same need.

OnGeometryChanging is not called when offline nor at sinchronize time.

Is there an alternative for this?

Roberto Montemor
Solution Consultant
E: roberto.montemor@hexagon.com
HEXAGON Brasil
Staff
Posts: 1,030
Registered: ‎10-18-2015

Re: How to get user login in Offline Mode ?

 Hi,

 

with a custom Java plugin you should be able to do it.

BTW also the solution provided by Lukas should be working fine: as soon as the user will get back online and post the offline capturing the OnGeometryChanging method will be fired and with that extension the formField populated accordingly.

 

Regards,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Occasional Contributor
Posts: 9
Registered: ‎10-13-2015

Re: How to get user login in Offline Mode ?

I tried this, but OnGeometryChanging is not called when we get back online.

Roberto Montemor
Solution Consultant
E: roberto.montemor@hexagon.com
HEXAGON Brasil
Staff
Posts: 1,030
Registered: ‎10-18-2015

Re: How to get user login in Offline Mode ?

did you try with an online workflow?

 

 

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.