Skip to content
Discussion options

You must be logged in to vote

Hi @zhang-zimin.

You will need to use an ECSQL query to get this information. To run the query on the frontend, you can use the IModelConnection.createQueryReader function.

The query could look something like this:

SELECT
    a.Element.Id AS ITwinElementId,
    COALESCE(
        (
            SELECT rl.Url
            FROM bis.RepositoryLink rl
            JOIN bis.ExternalSource es ON es.Repository.Id = rl.ECInstanceId
            WHERE es.ECInstanceId = a.Source.Id
            LIMIT 1
        ), (
            SELECT rl.Url
            FROM bis.RepositoryLink rl
            JOIN bis.ElementHasLinks ehl ON ehl.TargetECInstanceId = rl.ECInstanceId
            JOIN bis.Model m ON m.ModeledE…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@diegoalexdiaz
Comment options

Answer selected by zhang-zimin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants