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: 

CompoundStructure.EndCap is not working

3 REPLIES 3
Reply
Message 1 of 4
i.nikolovVXJQ6
747 Views, 3 Replies

CompoundStructure.EndCap is not working

Hello,

 

I am creating a new WallType by duplicating existing one. Then I edit the structure - adding new layers.

Also, I am setting the  OpeningWrapping to Both and I want to set the EndCap to Interior. 

Unfortunately, the EndCap never changes and stays Exterior

 

structure.EndCap = EndCapCondition.Interior;
structure.OpeningWrapping = OpeningWrappingCondition.ExteriorAndInterior;

 

Does someone have any ideas about why it is not changing?

 

Thank you in advance!

 

Ivan

3 REPLIES 3
Message 2 of 4

Dear Ivan,

 

Thank you for your query.

 

I cannot say anything off-hand.

 

There could be many possible reasons.

 

Can you set the desired end cap behaviour manually through the user interface?

 

If not, it will normally not be possible to do so programmatically either.

 

Do you have an open transaction?

 

Can you commit other changes in it?

 

Are you applying other changes to the model that might conflict with the end cap condition?

 

Instead of asking you hundreds of questions, I suggest that you provide a minimal reproducible case:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

  • A short exact description of what you are trying to achieve.
  • The behaviour you observe versus what you expect, and why this is a problem.
  • A complete yet minimal Revit sample model to run a test in.
  • A complete yet minimal macro embedded in the sample model or Visual Studio solution with add-in manifest that can be compiled, loaded, run and debugged with a single click to analyse its behaviour live in the sample model.
  • Detailed step-by-step instructions for reproducing the issue, e.g. which element to pick, what command to launch etc.

 

I hope this helps.

 

Thank you!

 

Best regards,

 

Jeremy



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

Message 3 of 4

Dear Jeremy,

 

Thank you for your fast reaction!

 

I created a simple example Visual Studio project which describes the problem that I am facing.

What I am trying to achieve in the sample project is to change the EndCap condition of a wall structure.

In order to reproduce the issue create a simple wall (let's say Generic - 8"), select it and run the command "Command TestEndCap".

The result should be the End Wrapping of the wall structure to be set to Interior.

 

I hope this describes the issue better.

 

Thanks for your help!

 

Best regards,

 

Ivan

Message 4 of 4

Dear Ivan,

 

In your sample code, you are using  

 

  wall.WallType.GetCompoundStructure().EndCap 
    = EndCapCondition.Interior;

 

 GetCompoundStructure returns a copy of the compound structure, so this statement will only modify the copy, if anything at all.

 

If you wish to modify the compound structure, you can use SetCompoundStructure.

 

Cheers,

 

Jeremy



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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community