Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RebarContainer.ByBars #82

Open
EvanMurphy17 opened this issue Feb 12, 2019 · 8 comments
Open

RebarContainer.ByBars #82

EvanMurphy17 opened this issue Feb 12, 2019 · 8 comments
Assignees

Comments

@EvanMurphy17
Copy link

Hello,

I am attempting to create a container containing a layout created with Rebar.SetLayoutAsMaximumSpacing, and the output is an Element. However, the RebarContainer.ByBars node only accepts Rebar[]. I was wondering if it's possible to allow the RebarContainer.ByBars node to accept Elements.

Thank you in advance.

Evan

@moethu moethu self-assigned this Feb 20, 2019
@moethu
Copy link
Contributor

moethu commented Feb 20, 2019

https://github.com/tt-acm/DynamoForRebar/blob/master/src/DynamoRebar/Revit/RebarContainer.cs#L388-L391
should be

            List<Revit.Elements.Rebar> mybars = new List<Revit.Elements.Rebar>();
            foreach (Revit.Elements.Element e in rebars)
            {
                if (e.InternalElement is Autodesk.Revit.DB.Structure.Rebar)
                {
                    Revit.Elements.Rebar bar = Revit.Elements.Rebar.FromExisting(e.InternalElement as Autodesk.Revit.DB.Structure.Rebar, true);
                    mybars.Add(bar);
                }
            }
            return new RebarContainer(mybars);

@moethu
Copy link
Contributor

moethu commented Feb 20, 2019

actually the output is: Revit.Elements.UnknownElement

moethu pushed a commit that referenced this issue Feb 20, 2019
@moethu
Copy link
Contributor

moethu commented Feb 20, 2019

@EvanMurphy17 please try: https://we.tl/t-PpfFw8nFi8

@EvanMurphy17
Copy link
Author

@moethu worked like a charm!

image

Thank you so much. Really appreciate all you do.

@moethu
Copy link
Contributor

moethu commented Feb 21, 2019

thanks, I'll let @eertugrul know to release a new version.

@moethu moethu closed this as completed Feb 21, 2019
@moethu moethu assigned eertugrul and unassigned moethu Feb 21, 2019
@moethu moethu reopened this Feb 21, 2019
@moethu
Copy link
Contributor

moethu commented Feb 21, 2019

@eertugrul could you release an update of this dynamo package please? see changes above

@EvanMurphy17
Copy link
Author

One (possible) issue:

I am not sure if I am misunderstanding what the Container.ByBars node does, but when I just have the rebar placed it looks like this:

image

When I take the rebar elements and feed them into the Container.ByBars node, it outputs this:

image

The rebar I had already created using ByCurve --> SetLayoutAsMaximumSpacing is there, but then there are duplicated instances in the wrong spots, that are rebar containers. Not sure if I am just misunderstanding the node, or if something is happening that is not intended.

Thanks for your help

@moethu
Copy link
Contributor

moethu commented Jul 1, 2019

@EvanMurphy17 sorry, I didn't see you question until now. I think you shouldn't create container bybars - that's only if you already got all your bars, but you want to create them by layputAsMaximumSpacing, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants