Accept primary design option in DesignOptionSet class

Accept primary design option in DesignOptionSet class

michael_tumminello
Participant Participant
1,020 Views
4 Replies
Message 1 of 5

Accept primary design option in DesignOptionSet class

michael_tumminello
Participant
Participant
Would like to accept the primary design option in model.
Accepted solutions (1)
1,021 Views
4 Replies
Replies (4)
Message 2 of 5

JimJia
Alumni
Alumni

Dear michael_tumminello,

 

If you want to edit design options via Revit API, you should use PostableCommand. See codes below:

 

public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            
            commandData.Application.PostCommand(RevitCommandId.LookupPostableCommandId(PostableCommand.DesignOptions));

            return Result.Succeeded;
        }

Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes
Message 3 of 5

michael_tumminello
Participant
Participant

Thanks for your reply.  What I am looking for is the ability to programmatically accept primary design options without going through the UI.  I believe the postable command will just open the interface where I would then be able to manually accept options?  The use case for this request is at the end of a project, when we are archiving models, it would be nice to have a method where we can run that as part of an overall clean-up process.  I will move this to revit ideas.  Thanks again.

 

MT

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

Dear Michael,

 

Here is an unofficial and unsupported workaround, maybe:

 

http://thebuildingcoder.typepad.com/blog/2015/03/list-and-switch-design-options-using-ui-automation....

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5

JimJia
Alumni
Alumni
Accepted solution

Dear Michael,

 

I am sorry to say that there is currently no API access to this functionality. 

You can submit a wish item if necessary.

 

This issue is important to me. What can I do to help?
This issue needs to be assessed by our engineering team, and prioritized against all of the other change requests that are outstanding. As a result any information that you can provide to influence this assessment will help. Please provide the following where possible:
• Impact on your application and/or your development. 
• The number of users affected. 
• The potential revenue impact to you. 
• The potential revenue impact to Autodesk. 
• Realistic timescale over which a fix would help you. 
• In the case of a request for a new feature or a feature enhancement, please also provide detailed Use Cases for the workflows that this change would address.
This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact Change Requests. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes