Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cable Tray Fittings Revit Family Free Download

107 views
Skip to first unread message

Joelle Ridgeway

unread,
Dec 31, 2023, 3:04:12 PM12/31/23
to
Metsec cable trays generally conform to BS EN 61537:2007 "cable management - cable tray systems and cable ladder systems" and are fully supported by independent testing at the Department of Mechanical Engineering at the University of Strathclyde.



cable tray fittings revit family free download

DOWNLOAD https://1lustglut-pscopro.blogspot.com/?djnn=2x03Xg






I'm working through this right now doing it the long way. When I export to DWG all of the cable trays export to the same layer, which is annoying as it does not keep the halftone visibility applied to certain trays (existing trays are being shown in halftone). So I need to manually clean up the DWG.


Anyway, the cable tray fittings export into blocks which are easy to select but tray straight sections export into a bunch of lines which are tedious to select. Can I tell revit to export them as blocks somehow?


eVolve Electrical has taken Revit's basic cable tray feature and enhanced it to load an advanced eVolve cable tray family with multiple types and fitting options. eVolve automatically adds drawn trays and fittings into streamlined BOMs and schedules with no additional information needing to be added.


eVolve also breaks down the projects trays and fittings into a Preconfigured Cable Tray BOM. Entering tedious fitting dimensions into schedules is not necessary in eVolve, as this all gets done automatically. This BOM is found in the Schedule drop down in the Project Browser.






I'm trying to get the midpoint, or any XYZ point really, of conduit and cable tray fittings so as to automatically apply an angle tag to them. I've already figured out getting the midpoint of straight pieces of conduit and auto tagging them, but am stuck on how to get the midpoint of a conduit's elbow fitting. If someone could point me to an SDK sample or building coder post or post a block of code here that points me in the right direction it would be much appreciated!Thanks.


Run Lookup is a streamlined add-in for Autodesk Revit that simplifies the calculation of the total length for selected conduit or cable tray runs. By factoring in angle bends in its calculations, Run Lookup excels in scenarios where the length or angle of a conduit run may be constrained.


Here is an extra long post, seeing as I will be occupied with a training course the coming two days.In the overview of the Revit MEP 2011 API, I mentioned that new elements have been introduced to represent cable trays and conduits.We already had a look at the creation of new conduit elements in the pipe to conduit converter. The creation of cable tray elements is equally simple, making use of the static Create method on the CableTray class.This is another example of the new element creation paradigm instead of the creation document classAutodesk.Revit.Creation.Document, a second generation API automatically generated with RIDL, the Revit Interface Definition Language.In order to automatically create a whole cable tray run, however, we need both the straight segment cable tray elements and also the fittings to connect them with each other, elbows to turn corners and branching elements to represent junctions.This is harder to implement for cable trays than for conduits, because the former have a rectangular cross section.To connect a horizontal cable tray segment with a vertical one requires the latter to be precisely oriented so that the elbow will line up properly with both.This is simpler for conduits, which have a round cross section.This led to the following questions and exhaustive exploration of cable tray fittings and orientation:Question: We are trying to create cable tray objects through API. When we create them manually, the joints (cable tray fittings) are automatically created. How can we achieve this programmatically?Answer: The situation for cable trays is the same as for duct and pipe elements, i.e. it is up to the application to explicitly create the fittings in between the segments as it sees fit.There is no way to auto-generate the fittings. You can however use the fitting APIs to create cable tray fittings yourself. For example, NewElbowFitting, NewTeeFitting, NewTransitionFitting, NewCrossFitting, should all produce valid cable tray fittings when connected to valid cable tray objects. You can create a fitting to join two connectors (at end of cable tray) by calling the Revit.Creation.Document.NewXyxFitting methods such as NewElbowFitting, NewTeeFitting etc. Each end of the cable tray segment has a connector.These methods take the connectors as input arguments. To use them, you can implement the following steps:Retrieve the connectors belonging to the cable tray, e.g. via cableTray.ConnectorManager.Connectors.Determine a pair of connectors which should be connected, for instance by checking their position, connector type, or something else.Call the appropriate NewXyzFitting method to create the Fitting element to join the connectors.The AutoRoute and AvoidObstruction Revit SDK samples demonstrate some uses of the new fitting methods.This explanation immediately leads to the next question:Question: When we create cable tray objects programmatically, they always appear parallel to X axis, like this:


This is the result of some initial test code that creates individual cable tray elements, but no fittings.It naively creates the cable trays one by one using CableTray.Create, and as you can see that does not generate the fittings nor rotate the trays into the right position relative to each other either.When we create them manually through the user interface, the cable trays automatically rotate to line up with their predecessor element, and the appropriate fittings are added to connect them:


How can we achieve this through the API, please?What is the correct way to programmatically create a run of connected cable trays, i.e. add fittings and correct relative positions?Can you provide a sample that shows how to do this?Answer: As said, you can simply use the New*Fitting methods to place the fittings between runs. However, I assume that the application has to ensure that the alignment and correct orientation is set up before they can create the fitting to connect properly.I initially tried to use the following code based on the ideas used in the AutoRoute SDK sample, but it does not work as expected: ElementId idType = new ElementId( 411325 ); ElementId idLevel = new ElementId( 311 ); XYZ start1 = new XYZ( -30.49, 38.42, 10.05 ); XYZ end1 = new XYZ( -20.43, 30.83, 10.05 ); CableTray tray1 = CableTray.Create( doc, idType, start1, end1, idLevel ); XYZ start2 = new XYZ( -20.43, 30.83, 10.05 ); XYZ end2 = new XYZ( -20.43, 30.83, 13.33 ); CableTray tray2 = CableTray.Create( doc, idType, start2, end2, idLevel ); Connector c1start, c1end = null; foreach( Connector c in tray1.MEPSystem.ConnectorManager.Connectors ) if( c.Origin.IsAlmostEqualTo( start1 ) ) c1start = c; else if( c.Origin.IsAlmostEqualTo( end1 ) ) c1end = c; Connector c2start = null, c2end; foreach( Connector c in tray2.MEPSystem.ConnectorManager.Connectors ) if( c.Origin.IsAlmostEqualTo( start2 ) ) c2start = c; else if( c.Origin.IsAlmostEqualTo( end2 ) ) c2end = c; if( null != c1end && null != c2start ) doc.Create.NewElbowFitting( c1end, c2start ); The first reason it does not work is that the cable tray MEPSystem property is null, so the connectors cannot be found.Instead, the cable tray element has its own ConnectorManager property, which provides access to the required connectors. After modifying the code to use that and adding the call to connect the two connectors, it succeeds, but the call to insert the elbow fitting still fails. Also, if I skip that call, the cable tray is still not rotated so that it matches up with its connected neighbour, even if the connectors are successfully connected: Connector c1start, c1end = null; foreach( Connector c in tray1.ConnectorManager.Connectors ) if( c.Origin.IsAlmostEqualTo( start1 ) ) c1start = c; else if( c.Origin.IsAlmostEqualTo( end1 ) ) c1end = c; Connector c2start = null, c2end; foreach( Connector c in tray2.ConnectorManager.Connectors ) if( c.Origin.IsAlmostEqualTo( start2 ) ) c2start = c; else if( c.Origin.IsAlmostEqualTo( end2 ) ) c2end = c; if( null != c1end && null != c2start ) c1end.ConnectTo( c2start ); // this throws // Autodesk.Revit.Exceptions // .InvalidOperationException: // "failed to insert elbow". doc.Create.NewElbowFitting( c1end, c2start ); The call NewElbowFitting which is used in the AutoRoute sample throws the exception "failed to insert elbow".I see that you are testing with cable tray elements, which may be adding geometrical complications to getting the test code right.I would suggest trying the same code using conduit elements first, since they have a simpler geometry shape. For example, the conduit probably does not care which direction is "up", etc. Also, another idea would be to draw some geometry using the user interface and analyse that. For example, lay out a run including pipe, elbow, and pipe, then extract the coordinates from it and try to recreate it through API. That way you will know the geometry is possible to create, the radius and ends points for the elbow are "correct", etc. From the initial exploration, we see that an application wishing to create a complete connected cable tray run will have to ensure that the cable trays are correctly aligned and also connect them with each other.The AutoRoute and AvoidObstructions Revit SDK samples provide a useful starting point, showing how to create a connected mechanical HVAC duct system and pipe deviations around obstructions. Similar principles apply for cable trays as well. The main differences between duct and cable tray are:Cable tray has no system.Cable tray and fittings have specific orientations.One needs to manually place and orient cable trays in the proper locations before creating the fittings between them.The connections can be created regardless, however.In the AutoRoute sample, the method CreateDucts calls the Revit API method NewDuct. It inserts a new duct element into the model and returns its two connectors at the end points. After creating the individual duct elements, the connectors are hooked up with each other using methods like m_document.Create.NewElbowFitting( connectors[2], baseConn2 );The duct connectors are retrieved through their MEPSystem property and its connector manager, which returns the connector set.In the case of cable trays, the MEPSystem property is null, so it cannot be used to retrieve the connectors. Happily, they have their own connector manager property themselves, so there is no need to go through the MEPSystem property.When I tried to connect the cable trays in a manner similar to the ducts in the AutoRoute sample, an exception was thrown: Autodesk.Revit.Exceptions.InvalidOperationException: "failed to insert elbow".During the further analysis of how to set up the cable trays appropriately to insert the fittings,one initial idea was that one should not be connecting the two connectors for the two items directly, but foreshortening them so that the connector can be properly inserted, e.g. leaving some space for the fittings. E.g., if the elbow radius is 6', the end of the first tray should be 6' away from the nominal intersection point, and the start of the second one as well, so that the elbow fits into the gap.The AutoRoute sample does indeed cut back the ducts by a certain distance: private const double min1FittingLength = 1;As we shall see below, however, this is not required for conduits and cable trays.When exploring the orientation of the cable trays in more depth, the next question was how to know what the correct orientation is, and how to set it once it is known?One can look at the cable tray's connectors, either the property 'Angle' or some part of 'CoordinateSystem', to determine its orientation.It also looks like some of the content is built 'on its side':

35fe9a5643



0 new messages