Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


3 Pages<123>
Options
Go to last post Go to first unread
Offline sinneD  
#21 Posted : 05 December 2015 03:21:44(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
Alex-

I have struggled for a good month trying to figure out how to get images in from Excel. Thanks for posting that.

And thank you for your example spreadsheet. That is another way to do it. It gives me something else to think about.

Dennis
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline RFreund  
#22 Posted : 05 December 2015 03:32:47(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Dennis -

I agree, a direct function or wrapper would be awesome, but seems to be tricky. As others have said.

I quickly realized that the only way I could utilize the Aisc search spreadsheet was by individual single calls as you posted in your latest reply. This is far too cumbersome. So I went back to looking up an entire row in the shapes database spreadsheet.

I would love to use a more robust procedure though.
Offline Alex M.  
#23 Posted : 05 December 2015 21:31:22(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Not sure if I am grasping the root of the issue, but you can fairly easily write a wrapper as a smath user defined function using excel_IO. One would think that this way you can write a wrapper for any custom .dll for EXCEL.

AISCsample.png

All I have done was creating a simple Index(Array,Match(),Match()) lookup in EXCEL (with proper implementation of SMath units), and used excel_IO to work with it.

Seems to work very fast.

As always - please test for bugs and use at your own risk.

P.S.: Update excel plugin for proper handling of cell error values

AISC Shape Lookup.xlsx (3,349kb) downloaded 384 time(s).
Steel Properties Look-up.sm (21kb) downloaded 164 time(s).

Edited by user 06 January 2016 21:52:36(UTC)  | Reason: Not specified

Offline RFreund  
#24 Posted : 01 January 2016 20:53:23(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Alex I appreciate your efforts with this.

I seem to be having a difficult time trying to use the "function/wrapper" inside a function.
My goal is be able to define a larger number of variables as quickly as possible. Lets assume that I need to define all the section property variables inside SMath in order my calculation to work properly. I like to establish these properties inside a function for two reasons - 1) it helps prevent variable definition overwriting. 2) I can call it many times through-out the page.

Ultimately I would set up an Smath page with multiple beam designs on the page.

Here is the condensed version of my issue:
Steel - Property Lookup Test.sm (30kb) downloaded 53 time(s).
AISC Shape Lookup.xlsx (2,981kb) downloaded 58 time(s).

Here is what I'm working towards:
Steel - Function - WF Design.sm (85kb) downloaded 75 time(s).
Offline RFreund  
#25 Posted : 04 January 2016 06:40:07(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Ioan - First, thanks for your efforts! However for some reason when I try to open the reader file the program crashes, any thoughts on why that might be?
Next, I'm trying to understand the basic strategy for obtaining the section properties as it appears that there is a few things going on in the SMath sheets. Meaning, lets say I have a new project where I wish to use the steel properties. What files do you copy in to the project folder?
Once I get this working I should be able to figure this out.

Thanks again!
thanks 1 user thanked RFreund for this useful post.
on 04/01/2016(UTC)
Offline ndtma  
#26 Posted : 04 January 2016 07:43:29(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 348
Man
Sri Lanka
Location: Colombo

Was thanked: 125 time(s) in 82 post(s)
For me also, when I try to open the reader file the program crashes.
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
thanks 1 user thanked ndtma for this useful post.
on 04/01/2016(UTC)
Offline Davide Carpi  
#27 Posted : 04 January 2016 14:18:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
The issues are in rfile/wfile; in these functions data is shared using the user settings, and crashes when you have argument separator or decimal separator different from those used in the file (in this case, ';' is needed to load correctly the file shared by Ioan)

1) to bypass the issue, launch the worksheet in the root folder and output the fWTImp_AISC file in the "Reader" folder

2) the crash is a bug, reported as SS-2288


Happy new year to everyone

Edited by user 04 January 2016 14:27:40(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 04/01/2016(UTC)
Offline Jean Giraud  
#28 Posted : 05 January 2016 05:40:26(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Happy New Year - 2016 - to Andrey, to All Developers and to All SMath Users !
______________________

Thanks ioan,

Same to all from Jean

Few days ago, I posted a nice WS "Season Greetings ! 2016"
in [Samples, Pattern shop].
thanks 2 users thanked Jean Giraud for this useful post.
on 05/01/2016(UTC),  on 11/01/2016(UTC)
Offline sinneD  
#29 Posted : 05 January 2016 07:45:02(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
Hey all-

с новым годом !

Felice Anno Nuovo!

Bonne Année!

Xρόνια πολλά

I am trying to catch up....

ioan, i am working on getting the files downloaded and figured out. but reading the comments, i think that the root of the issue is getting missed.

the database and spreadsheet by design is supposed to have blank vertical regions because not all shapes have all the same properties. we don't want to process it further. we really done want to decompose it and condense it. that will lead to errors and confusion.

the database and spreadsheet get regularly updated. this file in fact has been in use for 15+ years. when updates to shapes occur, these files get republished. that way, there is some predictability in accuracy in information, and repeatably.

ryan- look again at the example that Alex.M put up. I think I emailed you another example sheet when i got it figured out. all you do is program the shape and property you are looking for and it talks to excel and it spits it back to you. you don't have to worry about lookups and column numbers.

it pains me to say so, but i think that you are doing way more work than is needed in your example calc. and there is the issue of verification. by burying the calcs in hidden sections and then recalling it is hard to check and verify. are you really saving much time doing this sort of calc in SMath vs something like RAM Sbeam? for one beam design, its hard to beat.

here are some examples of how the calcs are done in excel. first picture has 2 halves. left half is what i print. right half if i need to put it in the calcs as a reminder or for review/permit. individual cells in gray on the left are user input.
the second picture, the stuff in gray is what is behind the image of the connection on the right side, and is some of the work in the background. and yes, i am little guilty of doing the same thing i pointed out to ryan as bad form, but the calc topic and result is more explicit.

conn-calc-example.PNGconn-calc-example-2.PNG

I think the best solution right now is what Alex provided us so far- giving us a pseudo-wrapper to push/pull from excel. we can simply define the shape and the property we need and move on with our calcs.

I am working on some handrail calcs right now that I am updating to the new way and will post some examples soon.

Dennis

Edited by user 05 January 2016 07:58:00(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Ian  
#30 Posted : 05 January 2016 17:40:27(UTC)
Ian

Rank: Newbie

Groups: Registered
Joined: 09/10/2015(UTC)
Posts: 1

Was thanked: 1 time(s) in 1 post(s)
Afternoon all,

I have been following this topic with interest over the last couple of months and to some degree agree with sinneD, the data from the spreadsheet is used within a set of calculations.

The data for a shape or serial size as we call them in Europe vary rarely gets amended - the last change occured when we started using EC3 and the axis notation altered.

EC3.zip (42kb) downloaded 42 time(s).

I have attached zip file containing a cut down version of what I use based on EC3 xls data file, both files must reside in same folder.

Not pretty but it works - amend the shape/section highlighted "green" to read another set of properties.

Ian
thanks 1 user thanked Ian for this useful post.
on 05/01/2016(UTC)
Offline Alex M.  
#31 Posted : 05 January 2016 21:00:39(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hi All,

While I am uncertain what would the the best approach to this problem, I am dedicated to make my excel plugin work as intended.

To RFreund and SinneD:

It seems that when my plugin is called inside a programmed function it has a difficult time identifying the working directory on its own. See a work around attached (define absolute path by concatting workingdir() and xlsx filename). I might try to pinpoint the bug if I have time - use the work around for the time being.

To ioan92:

I would much appreciate if you could let me know why the plugin does not work for you - again I am dedicated to fixing it if necessary. A good starting point is to delete and redownload the plugin from extension manager - it is still work in progress.

Steel - Property Lookup Test.sm (37kb) downloaded 51 time(s). AISC Shape Lookup.xlsx (2,981kb) downloaded 49 time(s).

Edited by user 05 January 2016 21:03:03(UTC)  | Reason: Not specified

thanks 1 user thanked Alex M. for this useful post.
on 05/01/2016(UTC)
Offline Alex M.  
#32 Posted : 05 January 2016 23:34:01(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hi Ioan :-)

First of all I would not want to take credit for something I have not done - it was RFeund who created the majority of the SMath workbook you were looking at. I just helped him to make it work as he intended. So I will leave it up to him to incorporate first of your two very relevant comments.

Small note though - the latest version of the plugin (0.2.0.28218) should import values with units from excel. Those units can be converted to inches as per usual SMath operation:

Untitled.png

I will want to learn how to use combobox plugin - I beleive the worksheet you attached earlier is a good guide :-)

Thanks,

Alex M.
thanks 1 user thanked Alex M. for this useful post.
on 06/01/2016(UTC)
Offline Davide Carpi  
#33 Posted : 06 January 2016 02:08:52(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Originally Posted by: ioan92 Go to Quoted Post
I was well surprised that your plugin closes automatically the Excel files already opened. I suggest to Davide to adopt this solution also for his xlsx import plugin.


Hello Ioan, xlsx files in my plugin are opened and closed on the fly, what kind of problem have you experienced?

Edited by user 06 January 2016 02:12:14(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#34 Posted : 06 January 2016 19:47:15(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hi Ioan,

The reason why excel_IO plugin connects to an already open file is because it works with EXCEL api and can connect to running instance of EXCEL. It does not quit the EXCEL process; instead it connects to it, makes it invisible, and does the calcs. Once SMath workbook is closed the plugin will make the EXCEL window visible again.

I believe Davide's plugin reads/writes xlsx files directly (unless the file is locked by EXCEL or any other process) - this is very useful for folks who either do not have EXCEL installed, or do not want SMath to rely on any dependecies (both are very valid reasons / desires).

Edited by user 06 January 2016 19:50:00(UTC)  | Reason: Not specified

thanks 2 users thanked Alex M. for this useful post.
on 06/01/2016(UTC),  on 07/01/2016(UTC)
Offline sinneD  
#35 Posted : 06 January 2016 21:00:27(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
ioan92-

i think that you are taking things out of context and reading too much from my critique. no offense or insult intended. if you want to share the holiday next year, i will be happy to raise my glass in a toast.

i was trying to point out that we have gone very far from the original question posed by ryan and i (is there any way to directly implement a search dll that gets called by an Excel VBA macro into SMAth directly). we are now solving a different problem, one that we have intentionally created by trying to work around a different one.

i think that the discussion has prompted good development and valuable discussion. I am grateful for Alex's comments because it has give me new tools with which to use within both Excel and SMath.

EDIT: regarding my admiration's- you misjudge me. I think Excel is the wrong tool for many applications, propagated by fools. The AISC database is a pain the behind, but it's the accepted consensus method. I was baptized in the river of Mathematica by none other than Theo Gray himself. Then I was forced to drink from the fountain of MathCAD. I choose to use SMath.


Excel- I really don't like Excel, but many engineers in the US (and any other math based profession) had it crammed down our throats as a tool to use because it came with PC's throughout the 90's and there are so many legacy calculations we have to maintain. As you can see from Ian's comments, we are not the only ones dependent on Excel for this sort of work. Our database gets updated everytime the code comes out. And there is the historic data one too that we have not even looked at. The format of the files are consistent between revisions.

Excel- excel seems to remain open, hidden or not. Alex described it exactly above. I often already have Excel open calculating other things already that I use to manually input into SMAth worksheet. I noticed that if SMath takes the focus from Excel doing work called up by SMath, then the other open spreadsheets get flaky really quick.

I have taken to:
-explicitly defined the directory and file that within SMath
-force Excel to be visible.

This is what I have been putting in my worksheet to be explicit for definitions. I am still trying to work through Davide's example.

Capture.PNG

Edited by user 06 January 2016 21:12:30(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 2 users thanked sinneD for this useful post.
on 07/01/2016(UTC),  on 07/01/2016(UTC)
Offline Davide Carpi  
#36 Posted : 07 January 2016 01:20:12(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Originally Posted by: Alex.M Go to Quoted Post
The reason why excel_IO plugin connects to an already open file is because it works with EXCEL api and can connect to running instance of EXCEL. It does not quit the EXCEL process; instead it connects to it, makes it invisible, and does the calcs. Once SMath workbook is closed the plugin will make the EXCEL window visible again.

I believe Davide's plugin reads/writes xlsx files directly (unless the file is locked by EXCEL or any other process) - this is very useful for folks who either do not have EXCEL installed, or do not want SMath to rely on any dependecies (both are very valid reasons / desires).

100% correct OK

Originally Posted by: ioan92 Go to Quoted Post
I wish you a Happy New Year !
In the image bellow it is reproduced the situation when the plugin cannot open a Excel file that is already opened

Wishes of a Happy New Year to you too! Good

I think I can try to bypass this issue, at least while reading. Stay tuned.


If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 07/01/2016(UTC)
Offline RFreund  
#37 Posted : 09 January 2016 17:44:08(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Wow, lots of action while I was away. First, thanks for everyone's contribution. I think we have already achieved a lot. I will try to summarize what I think our different objectives are.

The main goal as mentioned by Dennis was to incorporate (by some sort or hard coding in smath) the ability to select a steel shape and instantly have access to its section properties. Essentially all the user has to do is select a shape from a drop down and bang all properties are now defined or could be easily retrieved.

Alex formulated a simple function (aka wrapper) in order to input a shape's name and retrieve whichever property you would like. My two (minor) issues with this is that 1.) I generally need all the properties of the shape (mostly because I will incorporate torsion/warping into my calculation) so it was a bit tedious/ugly to have to call the function multiple times. But I did do this and it worked (thanks Alex!). 2.) So I took it one step further to hide it in a function (uh-oh, nobody likes this). I apologize as I think this has muddied the waters. I do appreciate the transparency of SMath calcs (as I think we all do), but I also like to be able to repeat a calculation on a single .sm page. Therefore the need for the function.

Ioan has created a program that succeeds in the task as well, I just need to try and fully understand it.
Alex also seems to have a work around for my function request, thank you!

So we seem to have solutions on the table, now I just need to figure out what's fastest/simplest to implement. And yet we won't be happy until we can select a shape from a drop down and have all the section properties ready to be defined into variables without having to fiddle with the excel sheet at all. <-- That sounds like the life of a software engineer Biggrin

Again thanks to All!
Offline Alex M.  
#38 Posted : 11 January 2016 21:51:58(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: RFreund Go to Quoted Post

So we seem to have solutions on the table, now I just need to figure out what's fastest/simplest to implement.


Ryan, will you be willing to share the end result of your work (use-at-your-own-risk style)? I would think alot could be learned from that.
Offline RFreund  
#39 Posted : 14 January 2016 06:36:41(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Of course. It just might take me some time... (sorry)
Offline zoom  
#40 Posted : 17 January 2016 00:12:49(UTC)
zoom

Rank: Newbie

Groups: Registered
Joined: 16/01/2016(UTC)
Posts: 7

Was thanked: 2 time(s) in 2 post(s)
Hi all,

I always learn new stuff when reading the comments. Thanks to everybody.

I would consider myself a basic SMath user so I haven't quite figured out a quick way to incorporate the units into the data yet.

The following sheet is kind of slow and defining each variable might be a hassle but I think it sort of answer the need of using the combo box and having the values adjust.

AISC_Label_Prop.sm (57kb) downloaded 93 time(s).
thanks 1 user thanked zoom for this useful post.
on 17/01/2016(UTC)
Users browsing this topic
Guest
3 Pages<123>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.