CyrilWaechter/pyRevitMEP

[PULL REQUEST] Cou

Opened this issue · 1 comments

Sorry, I have a report a bug because I can't pull a request.

I would like to add an function to hide a element in a view like :

https://knowledge.autodesk.com/community/screencast/6add9619-6bec-468e-b166-a93f10777750

Can you make it or explain how I can help you ?

I have done it without dynamo :

{ "Uuid": "f14a0f38-07c3-49d0-a1e2-0ee3b6307846", "IsCustomNode": false, "Description": null, "Name": "Cacher un tronçon", "ElementResolver": { "ResolutionMap": {} }, "Inputs": [], "Outputs": [], "Nodes": [ { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", "NodeType": "FunctionNode", "FunctionSignature": "Revit.Elements.Element.OverrideInView@Revit.Filter.OverrideGraphicSettings,bool", "Id": "e5878418d13145bd99776438bd895f79", "Inputs": [ { "Id": "ad0282ee13ac44888a11851c604e29b9", "Name": "element", "Description": "Revit.Elements.Element", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "5fca401d7a6f4aedb07acf903ab258a3", "Name": "overrides", "Description": "Override Graphics Settings.\n\nOverrideGraphicSettings", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "265a6623e32645b1990b002a3e35f673", "Name": "hide", "Description": "If True given Element will be hidden.\n\nbool\nDefault value : false", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "fe81d221f6cb4c1d902a9143fb33a31f", "Name": "Element", "Description": "Element", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Auto", "Description": "Override Elements Graphics Settings in Active View.\n\nElement.OverrideInView (overrides: OverrideGraphicSettings, hide: bool = false): Element" }, { "ConcreteType": "Dynamo.Nodes.DSModelElementSelection, DSRevitNodesUI", "NodeType": "ExtensionNode", "InstanceId": [ "30619862-bc34-4d1b-96fb-5844510871ac-0018745b" ], "Id": "31c1cf30e13a42fb9c2e26f1ce32f17f", "Inputs": [], "Outputs": [ { "Id": "29c6ab80b5854bf0acaaebee49f9bf38", "Name": "Element", "Description": "The selected elements.", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled" }, { "ConcreteType": "CoreNodeModels.Input.BoolSelector, CoreNodeModels", "NodeType": "BooleanInputNode", "InputValue": true, "Id": "1cf81fe4e3244006a937b7cb1aacc72f", "Inputs": [], "Outputs": [ { "Id": "8533915159a54e15a35d9528d2c1d1b8", "Name": "", "Description": "Boolean", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "Selection between a true and false." }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", "NodeType": "FunctionNode", "FunctionSignature": "Revit.Filter.OverrideGraphicSettings.ByProperties@DSCore.Color,DSCore.Color,DSCore.Color,DSCore.Color,Revit.Elements.FillPatternElement,Revit.Elements.FillPatternElement,Revit.Elements.LinePatternElement,Revit.Elements.LinePatternElement,int,int,int,string,bool", "Id": "01d8c99111ec4850b76ee890108cba48", "Inputs": [ { "Id": "cf5dd177296044589d4ca991a96636f1", "Name": "cutFillColor", "Description": "Fill color\n\nColor\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "71aed1b885eb4245864b1ab8361fdb26", "Name": "projectionFillColor", "Description": "Projection color\n\nColor\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "983c2390246f46698ff301d115fa6be3", "Name": "cutLineColor", "Description": "Cut line color\n\nColor\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "77c4fb9497cf4888b106838e6ba8b95a", "Name": "projectionLineColor", "Description": "Projection line color\n\nColor\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "1d57f236466d4d6a909a2c767d7eb8aa", "Name": "cutFillPattern", "Description": "Cut fill pattern\n\nFillPatternElement\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "e5119982772d408c97947782b8048d24", "Name": "projectionFillPattern", "Description": "Projection fill pattern\n\nFillPatternElement\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "983fa3a0d48545e988ff036182234e0c", "Name": "cutLinePattern", "Description": "Cut line pattern\n\nLinePatternElement\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "d01921db6dce42f39fa73ce750957869", "Name": "projectionLinePattern", "Description": "Projection line pattern\n\nLinePatternElement\nDefault value : null", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "f67d11c152f640f897d16d53e02a2d48", "Name": "cutLineWeight", "Description": "Cut line weight\n\nint\nDefault value : -1", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "2290977bf12146d3aaa3b23c637bcfd9", "Name": "projectionLineWeight", "Description": "Projection line weight\n\nint\nDefault value : -1", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "e65af182359d43a993c4727b461e6284", "Name": "transparency", "Description": "Transparency as integer between 1-100.\n\nint\nDefault value : -1", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "f095f2996c394034ac594f20c978c788", "Name": "detailLevel", "Description": "Detail Level setting, ex: Coarse, Fine etc.\n\nstring\nDefault value : \"Undefined\"", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "4eb924cd9ab14b9e9b3536b85cb22a78", "Name": "halftone", "Description": "Halftone. True = halftone.\n\nbool\nDefault value : false", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "2c0e0b93b93143818bb292b7cdaa17fc", "Name": "overrides", "Description": "Override Graphic Settings", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Auto", "Description": "Create a OverrideGraphicSettings Element.\n\nOverrideGraphicSettings.ByProperties (cutFillColor: Color = null, projectionFillColor: Color = null, cutLineColor: Color = null, projectionLineColor: Color = null, cutFillPattern: FillPatternElement = null, projectionFillPattern: FillPatternElement = null, cutLinePattern: LinePatternElement = null, projectionLinePattern: LinePatternElement = null, cutLineWeight: int = -1, projectionLineWeight: int = -1, transparency: int = -1, detailLevel: string = \"Undefined\", halftone: bool = false): OverrideGraphicSettings" } ], "Connectors": [ { "Start": "29c6ab80b5854bf0acaaebee49f9bf38", "End": "ad0282ee13ac44888a11851c604e29b9", "Id": "0ade2516034e4099b0474944db3e7688" }, { "Start": "8533915159a54e15a35d9528d2c1d1b8", "End": "265a6623e32645b1990b002a3e35f673", "Id": "fd8edae7fe944292a03f06a3114ee3c2" }, { "Start": "2c0e0b93b93143818bb292b7cdaa17fc", "End": "5fca401d7a6f4aedb07acf903ab258a3", "Id": "5562b848246c43b795d988b00bf3f8e3" } ], "Dependencies": [], "NodeLibraryDependencies": [], "Bindings": [], "View": { "Dynamo": { "ScaleFactor": 1.0, "HasRunWithoutCrash": true, "IsVisibleInDynamoLibrary": true, "Version": "2.3.0.5885", "RunType": "Manual", "RunPeriod": "1000" }, "Camera": { "Name": "Background Preview", "EyeX": -17.0, "EyeY": 24.0, "EyeZ": 50.0, "LookX": 12.0, "LookY": -13.0, "LookZ": -58.0, "UpX": 0.0, "UpY": 1.0, "UpZ": 0.0 }, "NodeViews": [ { "ShowGeometry": true, "Name": "Element.OverrideInView", "Id": "e5878418d13145bd99776438bd895f79", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 2011.4681906433952, "Y": -237.57880036993691 }, { "ShowGeometry": true, "Name": "Select Model Element", "Id": "31c1cf30e13a42fb9c2e26f1ce32f17f", "IsSetAsInput": true, "IsSetAsOutput": false, "Excluded": false, "X": 1492.2319233593175, "Y": -310.9438675056852 }, { "ShowGeometry": true, "Name": "Boolean", "Id": "1cf81fe4e3244006a937b7cb1aacc72f", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1602.8126748654502, "Y": 346.50643374250592 }, { "ShowGeometry": true, "Name": "OverrideGraphicSettings.ByProperties", "Id": "01d8c99111ec4850b76ee890108cba48", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1471.9805850069617, "Y": -139.54367167328718 } ], "Annotations": [], "X": -693.04636557113213, "Y": 341.98307957158642, "Zoom": 0.66374309525808672 } }

Sorry, I have a report a bug because I can't pull a request.

You cannot make a pull request because you don't know how to do it or because you are not able to make it works on your own computer ?

I have done it without dynamo :

You mean within instead of without ?
I have no interest in this feature even if I understand why you do. So the best way to get it done is to code it yourself. I have multiple article which explains how I design a script or with very short examples : pythoncvc.net
If you start coding it and get stuck somewhere tell me.
I have never tried but apparently pyRevit is able to accept Dynamo script for your pushbutton : https://www.notion.so/pyRevit-Bundles-12323e3090904d9aa7cdc3d82095d3e3#db0906b5f782457c947a1cd6549c7306