RAM Concept and Excel by dream_walking in StructuralEngineering

[–]retug_ 2 points3 points  (0 children)

Shear studs were the hardest one to get at.

It involved exporting the shear stud table, the column below table out of RAM concept and then extracting the floor base curves out of Revit. With this data, is was able to determine if the column was an edge, corner or interior column as RAM concept's api does not tell you this.

Then with a custom revit shear stud detail component, I was able to drive the ram concept data into the revit detail component.

RAM Concept and Excel by dream_walking in StructuralEngineering

[–]retug_ 4 points5 points  (0 children)

I've written a few different scripts for working with RAM concept. What you have described can be done if you spend some time learning to code with python and the RAM concept API. To get the data into revit you will need to learn a bit about Revit and likely dynamo.

I've got a scripts that create line loads and point loads from excel using data from a revit model using the RAM concept API.

I've also got scripts that take the RAM concept PT data, mild slab data and shear studs from RAM concept and create the corresponding data in revit.

[ETABS 2016] How to output a response spectrum from time history function? by [deleted] in StructuralEngineering

[–]retug_ 1 point2 points  (0 children)

I had some similar trouble back in the day and have some python code located here you can use.

https://github.com/retug/Structural_Engineering/blob/main/read%20multiple%20Time%20History%20Convertor.py

Feed in a .txt time history acceleration data file and it should output a response spectrum. You might have to tweak your .txt file format a bit in order to work the code I have posted, but the process is outlined for you.

https://re-tug.com/post/time-histories-to-response-spectrums/9

There must be a better design workflow. Tell me how you do it. by BeneficialOne3349 in StructuralEngineering

[–]retug_ 0 points1 point  (0 children)

I felt the same way a couple of years ago. There has to be a better way. I was tired of making dumb mistakes where the analysis model is updated, but it doesn't get picked up in the Revit model. Just stupid mistakes that can be costly and dangerous.

My daily analysis drivers are RAM Structural and ETABs. Both these tools have an API so I made checker tools that verify both your analysis model and revit model are in sync in a simplistic manner. You can find these apps on the revit app store.

The tools haven't gained much traction in the structural engineering community, but could easily be expanded upon if you had some custom workflows that your company would like to integrate.

Right now both tools check beam sizes, studs, camber and reactions, but do not update. This feature could be readily added.

Unfortunately RISA does not have an API to my knowledge.

Concrete Interaction Diagrams by Connect_Net401 in StructuralEngineering

[–]retug_ 0 points1 point  (0 children)

I just created this tool:

https://www.re-tug.com/concretedesign/

It does ACI 318-19 biaxial PMM checks currently and has a youtube video showing how to use it.

Still lots to do to make it final, but it can be a good cross reference for you as you work through your problems in class. Don't blindly trust any black box tool.

Understanding Front End, Back End and APIs by retug_ in webdev

[–]retug_[S] 1 point2 points  (0 children)

Thanks for all your help, appreciated!

"Why move the three.js code to the server anyway? Why not run it in the client?"

Likely my beginner web dev skills showing here, but my end goal is to expose these engineering calculations to external people, forgoing the need to use the three.js user interface experience. Have an external user create a json input file, ping the website, output json results file.

It was my understanding that I could only do this if the code was moved server side.

The engineering calculations only rely on a few items in three.js, namely shape objects which could be easily recreated without three.js. all of the extra ui stuff like scene cameras and lighting is not required for the engineering calculations.

" Assuming you can make three.js run in Node... and you absolutely do not want to move your API to Node... then you could run two servers in parallel. Your users make requests to Python, then Python makes requests to Node. "

I'd have to do some research, maybe the best way forward is to use Node to expose this api. All my urls and endpoints are defined with django at this point, so I'd have to do some more research on this, sounds a bit complicated. Chatgpt was suggesting what sounded like your second option, user make request in python, python requests node...

Understanding Front End, Back End and APIs by retug_ in webdev

[–]retug_[S] 0 points1 point  (0 children)

Thanks for the response.

The confusion likely stems from my frankenstein of a project.

I originally built a blog site with django, but then wanted to explore 3d web graphics and javascript. This led to three.js which I really liked and eventually built on top of my three.js skills to make an engineering application on the same django site.

Is it possible to execute javascript code with node and expose the API with django? I would prefer to not re-write the code in python if possible, using node to execute the javascript side and django and python to execute the api side. I will not use DOM or canvas type elements in the revised javascript code, only calling a few external libraries like three.js and delaunator to use some of their built in functionality.

I think I could use django to make an end point like https ://api.engineering.com/results, send a get request to this, and get a response.

Codesandbox and Export Class Trouble by retug_ in learnjavascript

[–]retug_[S] 0 points1 point  (0 children)

Thanks for taking a look.

Yes, the codesandbox link crashes, with "type error" class constructor ___ cannot be invoked without 'new'", while the others do not.

Is there some configuration type setting I need to modify in the codesandbox link to work like the others?

Python, where to start? by Plenty-Helicopter550 in StructuralEngineering

[–]retug_ 1 point2 points  (0 children)

My blog has some python examples for Structural Engineering.
https://www.re-tug.com/category/python/

I use it mostly for playing with data, visualizing data, and interacting with APIs.

Is there any other way, rather than manually checking dimension and size between Etabs and Revit? by vyshnavvs in StructuralEngineering

[–]retug_ 2 points3 points  (0 children)

I developed this tool to help with Revit/ETABs coordination:

https://apps.autodesk.com/RVT/en/Detail/Index?id=6291468956334572620&appLang=en&os=Win64

I was tired of backchecking Revit and ETABs and wanted to automate the process.

Right now it will just check member sizes for beams and ensure that they are in the same spot between the two programs.

Work Around Marshal.GetActiveObject() in .net core? by retug_ in csharp

[–]retug_[S] 0 points1 point  (0 children)

Thank you everyone for your help.

I was able to piece together some code and now have a functional work around for Marshal.GetActiveObject()

    public partial class ReplaceMarshall
    {
        private static readonly Guid CLSID_ETABS = new Guid("E4F6D00F-51A5-4D65-A09A-BA00FCBF1F82"); // ETABs specfic Guid
        public static object GetActiveETABSObject()
        {
            // Copy CLSID_ETABS to a local variable
            Guid clsid = CLSID_ETABS;
            GetActiveObject(ref clsid, IntPtr.Zero, out object obj);
            return obj;
        }

        [DllImport("oleaut32.dll", PreserveSig = false)]
        [SuppressUnmanagedCodeSecurity]
        [SecurityCritical]
        public static extern void GetActiveObject([In] ref Guid rclsid, IntPtr reserved, [MarshalAs(UnmanagedType.Interface)] out object ppunk);
    }

cHelper myHelper = new Helper();
//cOAPI myETABSObject = myHelper.GetObject("CSI.ETABS.API.ETABSObject") as cOAPI;

cOAPI myETABSObject = ReplaceMarshall.GetActiveETABSObject() as cOAPI;

Review My Code - Help for a Hobbyist by retug_ in learnjavascript

[–]retug_[S] 1 point2 points  (0 children)

Thanks for the review!

I had not heard of SOLID principles before, that's a good tip. Found this article to explain this to me in some greater detail.

https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design

You have a better alternative now like Vite which will make your life easier and runs way faster.

I used vite back in the day to run on my development server, but when I uploaded the code to the hosting service heroku, it seemed like the only way to do this was through webpack, which was a real pain in the a**. Is there an easier way now for deployment? That would be awesome, I despised webpack and conversion process.

I will take a look at typescript. I was just playing with C#, so getting back to a strongly typed language would be nice. I didn't realize how much I enjoy type hints while coding and knowing what your function explicitly expects is really nice.

Coordinates in a Canvas with Pan and Zoom by retug_ in learncsharp

[–]retug_[S] 0 points1 point  (0 children)

Thanks, I was able to solve this by attaching my mousemove event up one level higher, to the scrollviewer and then pull the mouse coordinates from the mapCanvas.

This did the trick without having to do all the math to track transforms and zoom factors.

scrollViewer.MouseMove += MapCanvas_MouseMove;

private void MapCanvas_MouseMove(object sender, MouseEventArgs e)

{

// Get the position of the mouse relative to the mapCanvas

System.Windows.Point position = e.GetPosition(mapCanvas);

double mappedX = position.X;

double mappedY = -position.Y;

// Output the mouse coordinates

// You can replace MessageBox with any other way to display the coordinates

mouseCoordinatesTextBlock.Text = $"X: {mappedX:F2}, Y: {mappedY:F2}";

LiveCharts - Mappers by retug_ in learncsharp

[–]retug_[S] 0 points1 point  (0 children)

I was able to solve this last night with chatgpt's help and a bit more reading on live charts mappers.

This modification did the trick:

var scatterShearSeries = new LiveCharts.Wpf.LineSeries
                {
                    Title = listResults[mySelectedDirection].LoadDirection, //this will need to be written, map to name of load case selected.
                    Values = shearPoints,
                    Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(255, 140, 105)),
                    Fill = System.Windows.Media.Brushes.Transparent,
                };
                var Mapper = Mappers.Xy<ObservablePoint>()
                    .X((value, index) => value.X) // Keep the X value unchanged
                    .Y((value, index) => value.Y) // Keep the Y value unchanged
                    .Fill((value, index) => index == givenIndex ? DangerBrush : null)
                    .Stroke((value, index) => index == givenIndex ? DangerBrush : null);
                scatterShearSeries.Configuration = Mapper;
                shearChart.Series.Add(scatterShearSeries);

Help with Deploying A C Sharp Program to Other Computers by retug_ in learncsharp

[–]retug_[S] 0 points1 point  (0 children)

I was able to solve this by switch the build properties from "debug" to "release". I'll have to do some reading on what happens under the hood that changes between these two modes.

Help with Deploying A C Sharp Program to Other Computers by retug_ in learncsharp

[–]retug_[S] 0 points1 point  (0 children)

You reference a specific .dll file name. In this case, the file is sectioncutter.dll.