Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting up IPreBuiltOptionsService options for CheckSet in AIT.

1 REPLY 1
SOLVED
Reply
Message 1 of 2
shrey_shahE5SN4
175 Views, 1 Reply

Setting up IPreBuiltOptionsService options for CheckSet in AIT.

Hello,

 

I am in the process of building an add-in button. When clicked, it will execute the Model Checker from Autodesk Interoperability Tools. Following the provided guidelines, I am progressing through the necessary steps. However, there is a prerequisite to create an IPreBuiltOptionsService before initializing a new service. How should I set up the pre-built options in this context?

 

ModelCheckList.xml - https://interoperability.autodesk.com/modelchecker/hostedchecks/bestpractices-2022.xml

 

 

public CheckSet GetCurrentCheckSet(Document doc)
{
    string checkSetPath = Path.Combine(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                "Resources",
                "ModelCheckList.xml");
    // Create an instance of a class that implements IPreBuiltOptionsService

    IPreBuiltOptionsService preBuiltOptionsService = {  };
    var service = new CheckSetService(preBuiltOptionsService);
    var checkSet = service.GetCheckSet(checkSetPath);
    var runStateRepository = new RunStateRepository(doc);
    var runState = runStateRepository.GetRunState();

    if (runState != null)
    {
        Utility.SetCheckSetFromRunState(checkSet, runState);
    }

    return checkSet;
}

 

Labels (3)
1 REPLY 1
Message 2 of 2

Sorry for the confusion. The help page updates did not finalize. We've updated the online help with the information for IPreBuiltOptionsService and updated the sample code as well. You may need to do a hard refresh in your browser to see the new pages. They sometimes cache more than expected.


Jason Kunkel
Senior Practice Manager, Architecture and Engineering
CADD Microsystems Blog
RVIT Blog | Twitter | LinkedIn

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community