Community
Topobase (Read Only)
Welcome to Autodesk’s Topobase Forums. Share your knowledge, ask questions, and explore popular Topobase topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

obtaining TopoBase user and making filter

2 REPLIES 2
Reply
Message 1 of 3
irene.rangel
396 Views, 2 Replies

obtaining TopoBase user and making filter

hello forum! I have some specific questions about using the API for TopoBase:
- How can I obtain the user (created using the TopoBase Admin) currently logged with VB code? If possible, how to obtain the user id?
- How can I make a filter, using VB code, to obtain a subset of the information when loading the "show form" dialog?

Thanks for any help
Regards,
Irene Rangel
2 REPLIES 2
Message 2 of 3
andreas.boos
in reply to: irene.rangel

Hi Irene

- How can I obtain the user (created using the TopoBase Admin) currently logged with VB code? If possible, how to obtain the user id?

You can use following code to get the user name and use id
(I suppose you are doing this in some plug-in, ‘Me’ here represents the plug-in instance)

Me.Application.UserName
Me.Application.UserId

- How can I make a filter, using VB code, to obtain a subset of the information when loading the "show form" dialog?

You can use following code to filter the data in the form:

Topobase.Forms.Dialog dialog = Me.Document.Dialog.Items(featureClass)

‘ Build a sql where clause formatted like: ‘fid in (1, 2, 3)’
‘ You can use it to filter the data

String whereClause = Topobase.Data.Provider.BuildInCondition(…)
dialog.Show(whereClause)

Hope this helps

Best regards
Andreas
Message 3 of 3
irene.rangel
in reply to: irene.rangel

Thanks for the responses. They helped a lot to solve my problems.

Regards,
Irene Rangel

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report