Why is Revit preventing me from linking models from the ‘Consumed’ folder on ACC?

I’ve written a script in pyRevit to fetch the Model Guid from ACC using the Data Management API, in order to programmatically link cloud models into the Revit file. I have “Admin” rights to the project hub and I am able to successfully link all models except the ones ‘Consumed’ into the project folder through Design Collaboration.

I get the following error:
You are unauthorized to access this hub/project or the hub/project doesn’t exist.
Haven’t found the cloud model. Please check if your cloud folder is accessible and if the model exists or not.

Here is relevant snippets from the script where I’m fetching the Guid from the response JSON:

def link_cloud_model(project_id, model_id):
    """Links a cloud model by shared coordinates"""
    
    # Convert Ids to GUIDs
    project_guid = System.Guid(project_id)
    model_guid = System.Guid(model_id)

    # Get Cloud Path
    cloud_path = ModelPathUtils.ConvertCloudGUIDsToCloudPath(
        "US", project_guid, model_guid
    )

    # Link the Model and create a link instance
    link_options = RevitLinkOptions(False)
    link_type = RevitLinkType.Create(doc, cloud_path, link_options)
    link_instance = RevitLinkInstance.Create(
        doc, link_type.ElementId, ImportPlacement.Shared
    )

def get_tip_version_data(project_id, selected_file_ids):
    """Gets the tip version or latest version of a list of ACC files"""

    model_data = []

    for item_id in selected_file_ids:
        target_uri =  f"https://developer.api.autodesk.com/data/v1/projects/{project_id}/items/{item_id}/tip"
        tip_version_data = requests.get(target_uri, headers=headers)
        model_data.append(tip_version_data.json())
    return json.dumps(model_data)

def main():
    # Fetching the tip data for a list of projects from ACC
    model_metadata = get_tip_version_data(project_id, project_files)

    # Fetch the Guid from the JSON object
    for model in model_metadata:
        id_path = model["data"]["attributes"]["extension"]["data"]
        model_id = id_path["modelGuid"]
        project_id = id_path["projectGuid"]

        transaction.Start("Link Cloud Model")
    l   link_cloud_model(project_id, model_id)
        transaction.Commit()

I thought that my permission level to the Shared folder where the external files are consumed into, might be the cause of the error. So I provided myself ‘Edit’ access but that didn’t work either.

Would the consultant who originally shared the package need to provide “Edit” or Manage rights to their project hub for this to work?

New contributor

Gokul Easwaran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Why is Revit preventing me from linking models from the ‘Consumed’ folder on ACC?

I’ve written a script in pyRevit to fetch the Model Guid from ACC using the Data Management API, in order to programmatically link cloud models into the Revit file. I have “Admin” rights to the project hub and I am able to successfully link all models except the ones ‘Consumed’ into the project folder through Design Collaboration.

I get the following error:
You are unauthorized to access this hub/project or the hub/project doesn’t exist.
Haven’t found the cloud model. Please check if your cloud folder is accessible and if the model exists or not.

Here is relevant snippets from the script where I’m fetching the Guid from the response JSON:

def link_cloud_model(project_id, model_id):
    """Links a cloud model by shared coordinates"""
    
    # Convert Ids to GUIDs
    project_guid = System.Guid(project_id)
    model_guid = System.Guid(model_id)

    # Get Cloud Path
    cloud_path = ModelPathUtils.ConvertCloudGUIDsToCloudPath(
        "US", project_guid, model_guid
    )

    # Link the Model and create a link instance
    link_options = RevitLinkOptions(False)
    link_type = RevitLinkType.Create(doc, cloud_path, link_options)
    link_instance = RevitLinkInstance.Create(
        doc, link_type.ElementId, ImportPlacement.Shared
    )

def get_tip_version_data(project_id, selected_file_ids):
    """Gets the tip version or latest version of a list of ACC files"""

    model_data = []

    for item_id in selected_file_ids:
        target_uri =  f"https://developer.api.autodesk.com/data/v1/projects/{project_id}/items/{item_id}/tip"
        tip_version_data = requests.get(target_uri, headers=headers)
        model_data.append(tip_version_data.json())
    return json.dumps(model_data)

def main():
    # Fetching the tip data for a list of projects from ACC
    model_metadata = get_tip_version_data(project_id, project_files)

    # Fetch the Guid from the JSON object
    for model in model_metadata:
        id_path = model["data"]["attributes"]["extension"]["data"]
        model_id = id_path["modelGuid"]
        project_id = id_path["projectGuid"]

        transaction.Start("Link Cloud Model")
    l   link_cloud_model(project_id, model_id)
        transaction.Commit()

I thought that my permission level to the Shared folder where the external files are consumed into, might be the cause of the error. So I provided myself ‘Edit’ access but that didn’t work either.

Would the consultant who originally shared the package need to provide “Edit” or Manage rights to their project hub for this to work?

New contributor

Gokul Easwaran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật