pyRevit icon indicating copy to clipboard operation
pyRevit copied to clipboard

Door flip state

Open mangrove-art opened this issue 11 months ago • 2 comments

Door flip state

Description

This script writes the mirror state (aka Left/Right) of doors back to an instance parameter 'Door Wing Opening Direction' in doors.


Checklist

Before submitting your pull request, ensure the following requirements are met:

  • [x] Code follows the PEP 8 style guide.
  • [x] Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
    
  • [x] Changes are tested and verified to work as expected.

Thank you for contributing to pyRevit! 🎉

mangrove-art avatar May 01 '25 18:05 mangrove-art

@mangrove-art Cool. Question: Do you really need all these parameters?

  • IMO creating parameters within a routine will refrain people to actually use it
  • You would not have to check for parameters existence
  • You could color and isolate in dedicated views: mirrored and inverted doors (and their host walls) each in a different color

If you feel like sticking with the parameters approach, I suggest you use only project parameters and create them while in the script, and have a routine to delete them afterward.

jmcouffin avatar May 02 '25 06:05 jmcouffin

@mangrove-art Cool. Question: Do you really need all these parameters?

* IMO creating parameters within a routine will refrain people to actually use it

* You would not have to check for parameters existence

* You could color and isolate in dedicated views:  mirrored and inverted doors (and their host walls) each in a different color

If you feel like sticking with the parameters approach, I suggest you use only project parameters and create them while in the script, and have a routine to delete them afterward.

Actually your thoughts are perfectly right although I cannot follow your advices. Let me explain.

  1. The project parameter called "Door Wing Opening Direction" is used to get the values in schedules, annotations and filters in specific views. I didn't want to missuse a builtin parameter to be explicit in meaning of the acquired information. As a parameter file is provided in the script folder it seems quite easy to create the parameter.

  2. The two parameters called "DoorFamilyOpeningDirection_standard" and "DoorFamilyOpeningDirection_mirrored" reflected for me the easyiest way to deal with different standard door swing directions modelled families in an existing project. They allow a liberty to provide f.ex. the same return value for both states like the case of a sliding door where the swing opening direction is not clearly defined. Also they allow to handle complex situations where a door is part of a panel and both can be mirrord, see image joined. Overall it was the most simpliest way to deal with all geometric exeptions for me. I recognize that is not a simple solution to the problem. @jmcouffin What do you think? 2025-05-02 17_42_57-Familientypen

mangrove-art avatar May 02 '25 15:05 mangrove-art