简体   繁体   中英

How do I select walls along a particular axis, among all the other walls, in Revit using the Revit API?

I want to change the height of all walls but the length of walls only in a particular axis, for instance, along the x-axis.

Consecutively, could you also tell how I could alter the similar dimensions for a house? Where there are connected walls?

I see nothing in this code that means it does not work.

However, it seems to me that it does not make much sense.

One would seldom constrain all wall heights to be user defined to a certain value; instead, in most Revit models, walls are constrained to reach from a bottom level to a top level. Then, if the height of all walls needs to be modified, you would modify the elevation of the top level only.

The logic of the code guarantees that the wall location line will only be modified if the newWallLine equals XYZ.BasisX . This may never be the case, since the line is a Line object and the vector an XYZ .

I would recommend researching exactly what you wish you achieve and how to do so manually in the end user interface before addressing the task programmatically.

In general, if a feature is not available in the Revit product manually through the user interface, then the Revit API will not provide it either.

You should therefore research the optimal workflow and best practices to address your task at hand manually through the user interface first.

To do so, please discuss and analyse it with an experienced application engineer, product usage expert, or product support.

Once you have got that part sorted out, it is time to step up into the programming environment.

I hope this clarifies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM