Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAP2000 Quick Plots 1

Brad805

Structural
Oct 26, 2010
1,499
I am tired of the time to enter the plot names for each .pdf file. Using PDFCreator I can dump a plot to a specified folder in seconds, but they are not named. So long as you print them in the order you want, you can bind them into a package easily when you are done. I see there is an option in PDFCreater to add a CSharp script. Is it possilbe to extract the model name and view setting from the model using CSharp and the API interface? Ideally I would like the saved name view titles, but I do not think that is possible.

Thank you

1737474365481.png

1737474527227.png
 
Replies continue below

Recommended for you

Hopelessly low tech but my quick and dirty would be:

1) Dump the plots to the same file as the model with no other PDF in there.

2) Copy an excel sheet into the same folder.

3) Write a VBA routine to extract the name of the model and rename all of the PDF's in kind. Maybe with a counter at the end depending on you needs.

4) Just keep using that same XLS over and over. Sure, you could do something fancier that has folder picking from an EXE file or something.
 
Never mind... I now see that you want to name based on model view names, not model file names. That will be fancier. @Celt83 may be good for this. Hitting the API or scraping the printed PDF's may well be required.
 
From an API perspective, I don't think there is a current way to get the named views. I do not see any API functions to work with named views, even in the database tables.

You can get the model name with the API though:


Code:
SapModel = ETABSObject.SapModel
#Get the filename of the ETABs model.
SapModelName = SapModel.GetModelFilename(False);
print(SapModelName)

It would be nice to get a bit more functionality in setting views and printing to automate calculation package creation.
If you open a service ticket about this, I bet they will get on it. They have been quite helpful when I have asked for certain API functionality to expanded upon.
 
Thanks guys. The model name is a start. The force diagrams must be stored somehow using the M33, V22, etc. names. If I could extract those along with the load combination I would be off to the races. I did ask tech support, but the person that responded seemed only marginally interested. It is a headache, and my projects are simple. I cannot imagine doing this for large projects. Maybe most do not print them out or just print the excel files?? I was about to send my IT guy on a wild goose chase, and I thought I would ask some of my more tech savvy people before doing that. I am glad I did. I am not much of a CSharp programmer.
 
The force diagrams must be stored somehow using the M33, V22, etc. names. If I could extract those along with the load combination I would be off to the races.
You most certainly can get all the forces in a frame elements and the corresponding load combinations.
 
Is this for calc package creation Brad?

Lots of times I rip data out of the API to automate graphs and plots outside of ETABs.

The plot below ripped out frame location data and forces to make the 3d plot.
Recording 2024-12-16 at 17.34.55.gif
 
Yes, I need to speed up my process to create the calc book in an electronic format. Our projects are all over the map, so templates have never worked well, but to be honest that might be a user issue more than a software problem. The idea of extracting the data and re-creating the plots has popped into my mind several times. That I could do with some python scripts. I know I could make the plots better. Thanks for the tips.
 

Part and Inventory Search

Sponsor