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

Notification

Icon
Error

Login


3 Pages123>
Options
Go to last post Go to first unread
Offline RFreund  
#1 Posted : 08 November 2015 18:48:40(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)
This is related to this post:

http://en.smath.info/for...2_Using-Data-Tables.aspx

I was wondering if it is possible to AISCsearch.dll to perform shape property look ups and integrate this with SMath.

Here is the search file Link

Also I attached a steel beam calculation example where I just use a matrix to obtain the beam properties. The calculation is slow although maybe that is not due to the matrix.
Steel - Beam.sm (1,398kb) downloaded 214 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline sinneD  
#2 Posted : 09 November 2015 19:57:47(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-

I asked Ryan to put this up for me as my account was locked...

There is a dll that is based on a FoxPro database. It can get called up with excel to lookup properties of sections. The dll is in the public domain by the readme.

its a function with 2 variables, Member/Size (W, S, M, HP, ....) and property (A, S, I, J, etc)

"Aisc_Search was written and compiled using Microsoft FoxPro V9. It incorporates the AISC Excel table
titled AISC.Shapes.Database.v14_0_0.xls" which has been converted from .XLS to .DBF format and compiled
into the programs using the filename "AISC_V14_0_0.DBF"
...
"The program is provided as AISC_Search.DLL, a fully functional self contained callable module that may
be compiled into other software products. AISC_Search.DLL is completely self-contained but requires a
calling function for use in Excel."

Here it is in Excel-


In Excel, we use it to lookup information to use in calculations like this-


I do not know enough about programming to figure this out on my own just yet. I have attached the files with dll, docs and dependencies below.

Is this something that we can use in smath? Can we call it natively?

AISC_Search_dll Setup.zip (2,378kb) downloaded 221 time(s).


Best regards

Dennis

Edited by user 09 November 2015 20:09:35(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Davide Carpi  
#3 Posted : 10 November 2015 01:54:34(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)
Obviously it should be possible, writing a wrapper. The problems probably are mostly about the plugin documentation and maybe dependancies (installation failed on my system, because failed attempts to write things in the Windows Registry).

Personally being able to choose I'd prefer to write a new library with supports of units and many profiles as possible (European, North American, etc...) and maybe plotting features, freely extensible for further improvements.

However there are several examples of wrappers in the SVN, if someone wants to try he can ask here for support in case of issues Good

Edited by user 10 November 2015 02:01:44(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 10/11/2015(UTC)
Offline sinneD  
#4 Posted : 10 November 2015 04:44:20(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)
Files_Installed_AISC_Search.zip (1,079kb) downloaded 70 time(s).The AISC lookup does not like 64 bit excel. I am not sure what in the registry could be written that may be wrong. I wonder if its country or export version sensitive?

EDIT 1: The registry info appears to be in the .VBR file. I pasted the info below.
EDIT 2: The source for the dll appears to be in the aisc_search.dll.prg file.
EDIT 3: The original source zip did not appear to have the files i was pointing at. I have attached a second zip file with the files that get installed by the installer.

The database does have metric units in it as long as you call out the shape as metric. I am not sure that it 'knows' metric shapes. Actually, I seem to recall that they are all metric shapes now and we yanks just get to think of them as US customary.

The originator was the founder of Fabtrol and the maintainer is an engineer at Irwin Steel. I have communicated with both in the past. I will volunteer to communicate/liason with them. I just don't know what to ask them for.

I am more than happy to contribute, but I am not sure if my weak programming is up to the task.

Dennis

aisc_search.VBR contents

Code:
VB5SERVERINFO
VERSION=1.0.0

HKEY_CLASSES_ROOT\aisc_search.AISC_Field_Value = aisc_search.AISC_Field_Value
HKEY_CLASSES_ROOT\aisc_search.AISC_Field_Value\NotInsertable
HKEY_CLASSES_ROOT\aisc_search.AISC_Field_Value\CLSID = {F9F33229-923E-4CD6-A5EF-9B3871700643}
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643} = aisc_search.AISC_Field_Value
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\ProgId = aisc_search.AISC_Field_Value
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\VersionIndependentProgId = aisc_search.AISC_Field_Value
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\InProcServer32 = aisc_search.dll
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\InProcServer32\"ThreadingModel" = Apartment
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\TypeLib = {B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\Version = 1.0
HKEY_CLASSES_ROOT\CLSID\{F9F33229-923E-4CD6-A5EF-9B3871700643}\Foxruntime = VFP9T.DLL
HKEY_CLASSES_ROOT\INTERFACE\{20872777-F934-4B5C-999F-7D5AA5EFE5F2} = AISC_Field_Value
HKEY_CLASSES_ROOT\INTERFACE\{20872777-F934-4B5C-999F-7D5AA5EFE5F2}\ProxyStubClsid = {00020424-0000-0000-C000-000000000046}
HKEY_CLASSES_ROOT\INTERFACE\{20872777-F934-4B5C-999F-7D5AA5EFE5F2}\ProxyStubClsid32 = {00020424-0000-0000-C000-000000000046}
HKEY_CLASSES_ROOT\INTERFACE\{20872777-F934-4B5C-999F-7D5AA5EFE5F2}\TypeLib = {B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}
HKEY_CLASSES_ROOT\INTERFACE\{20872777-F934-4B5C-999F-7D5AA5EFE5F2}\TypeLib\"Version" = 1.0


; TypeLibrary registration
HKEY_CLASSES_ROOT\TypeLib\{B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}
HKEY_CLASSES_ROOT\TypeLib\{B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}\1.0 = aisc_search Type Library
HKEY_CLASSES_ROOT\TypeLib\{B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}\1.0\0\win32 = aisc_search.dll
HKEY_CLASSES_ROOT\TypeLib\{B96DF66F-9CE9-4C8D-8E89-E96B8B7F2159}\1.0\FLAGS = 0

Edited by moderator 12 November 2015 11:35:34(UTC)  | Reason: added files

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline sinneD  
#5 Posted : 12 November 2015 03:06:20(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)
1. I think I have figured out a way to draw the shape, at least where to extract the data needed.

2. Here are the pertinent contents of the source for the dll for Foxpro programming. I think it reveals the structure of the dll.

I am still trying to get my head around the wrapper. Can someone point me to somewhere that I can read up on it conceptually?

thanks

dennis


Code:
DEFINE CLASS AISC_Field_Value AS CUSTOM OLEPUBLIC

PROCEDURE AISC_Field_Value_Function

LPARAMETERS cThisSize, cThisValue

* Set up the environment to operate quietly and with utmost exactitude
SET TALK OFF
SET EXACT ON

* nReturnValue is the value returned from the table. If not found, it returns zero
nReturnValue = -1

* lSizeOk is a logical that determines whether the Size passed in is valid
* If cThisSize is a character string and is found in the list titled EDI_Std, lSizeOk = .T.
lSizeOk      = .F.

* lValueOk is a logical that determines whether the Value passed in is valid
* If cThisValue is a character string and is a valid field name (in the long IF statement below), 
* then lValueOk becomes .T.
lValueOk     = .F.

* Make sure cThisSize is a character string
IF TYPE( 'cThisSize' ) = 'C'
  lSizeOk    = .T.
  * Convert the string to Caps and remove extraneous spaces
  cThisSize  = UPPER( STRTRAN( cThisSize, ' ', '' ))
ENDIF

* Make sure cThisValue is a character string 
IF TYPE( 'cThisValue' ) = 'C'
  lValueOk   = .T.
  * Convert the string to Caps
  cThisValue = UPPER( cThisValue )
ENDIF

IF lSizeOk AND lValueOk 
  * Make sure that the field name passed in is a valid choice
  * If the fields are changed by the AISC in the future, add to or edit this list
  IF cThisValue = 'METRIC'     OR ;   && added 2011
     cThisValue = 'TYPE'       OR ;
     cThisValue = 'EDI_STD'    OR ;   && revised name-2006
     cThisValue = 'AISC_MAN'   OR ;   && revised name-2006
...
...
...
...
    cThisvalue = 'PB'

     lValueOk = .T.
  ELSE
     lValueOk = .F.
  ENDIF

  * This is where we do the actual look up
  IF lSizeOk AND lValueOk

    * Make sure our file is in use and the index is set correctly
    IF NOT USED( 'AISC1' )
      USE AISC_V14_0_0 IN 0 ALIAS AISC1
    ENDIF

    SELECT AISC1
    SET ORDER TO EDI_STD
    
    * Find the correct record
    IF SEEK( cThisSize )
      * Find the value in the specified field
      nReturnValue = &cThisValue
    ENDIF

	* Check if 0 value in table, if so return a dash
    IF TYPE( 'nReturnValue' ) = 'N' AND nReturnvalue = 0 && 2011
       nReturnValue = '-'								 && 2011
    ELSE												 && 2011
       nReturnValue = &cThisValue						 && 2011
    ENDIF												 && 2011

  ENDIF lSizeOk AND lValueOk AND Aisc_Lookup()
ENDIF lSizeOk AND lValueOk

RETURN nReturnValue

ENDPROC

ENDDEFINE

Edited by moderator 12 November 2015 11:35:03(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline sinneD  
#6 Posted : 12 November 2015 03:17:30(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)
the other piece that I think is needed is this .bas file-
but looking at it, now I am a little worried because I think it calls 32bit functions and I do not know enough about SMath internals.



Code:
Attribute VB_Name = "AISC_Search"

Declare Function aisc_field_value_function Lib "AISC_Search" _
    (cthissize As String, cthisvalue As String)


Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long

Declare Function GetActiveWindow Lib "user32" () As Long



Public Function AISC(Shape As String, Property As String) As Variant

    Dim SteelSearch As Object
    Set SteelSearch = CreateObject("aisc_search.aisc_Field_Value")

AISC = SteelSearch.aisc_field_value_function(Shape, Property)

End Function

Edited by moderator 12 November 2015 11:34:36(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline sinneD  
#7 Posted : 14 November 2015 03:02:37(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)
So this is proving to be more challenging than I imagined.

I think I can do what I want with some judicious trimming and logic. But I need a little help...

1. Symbolic optimization for importing data from spreadsheets: Does this matter if some of the entries in the cells are text entries?

2. Finding the right row is a challenge. the vlookup function would be what I would use in Excel to find the right row. Once I can get to the right row, I can extract the column that I need.

My challenge is getting to the right row in an efficient manner. Once I can get to the row, I can make the definitions that I need.

Thing is how do we 'find' the row efficiently?

Dennis


Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Davide Carpi  
#8 Posted : 14 November 2015 18:13:02(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)
Hello Dennis,

About the first point I don't think that the symbolic engine is the best for importing numbers and texts (because performances and the purpose itself of the symbolic engine). Much better to use the numeric engine (or the low-level Terms alternatively); If you notice errors or the output is a variable instead of a string, enclose the text with the string characters

Code:
text = SMath.Manager.Symbols.StringChar + text + SMath.Manager.Symbols.StringChar;


As for the second point I don't know how you are approaching the marshalling (how you access the data from the plugin? I've not found a way to access the data embedded in the dll);

Other issues found from a fast survey:
- the plugin is made for 32 bit systems (cannot run the plugin on 64 bit systems, except if you change the flags of the SS executable);
- Dependency Walker shows me several dependencies (may be related to my 64 bit system);
this may make the plugin available for a limited range of users (you must have a 32 bit system and the administrator privileges to install dependencies)

Because I see the archive you attached above contains a dbf file I'd suggest to try to build the plugin over the database instead of using the dll: read DBF in C#
(maybe there is a better way, in this moment I don't have other ideas)

Edited by user 14 November 2015 21:09:13(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 sinneD  
#9 Posted : 14 November 2015 22:57:35(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)
Davide-

Thanks for the input. I am working with Windows 10 64 bit for an OS. Curiously, what I found out was that it does not work yet with 64bit Excel.

So is there a difference between the dll getting used in the OS or withing Excel?

It does work with Excel 32 bit. Curiously enough, MSOffice installed 32 bit version by default. You have to manually browse to the 64 bit folder to run setup from there to get a 64bit version. From my accounting friends they all run 32bit excel and avoid it because of all the scripting that they do it was all in 32 bit so no one is upgrading.

In talking to the maintainer of the dll, it has not yet been updated to 64 bit.

SO I am trying to understand if either of these 2 approaches will work before I brute force a new calc-

1. Can SMath send the 'request' to the dll and retrieve the results it gives? Since this is how it works now with excel, can smath do it this way?

2. Can smath send the variables to an excel spreadsheet and then get the calculated value from it. We can have a 3 cell spreadheet that all it does is have the two of them get the variables info from Smath of section and physical properties and the 3rd as the result of the search.

Most importantly, what kind of performance/efficiency will this yield. I am not looking to win a race by anymeans. Its more about keeping things clean and efficient.

I think instead of a wrapper to make use of a Foxpro 9 database, I would rather have a separate calc sheet with all the information in it and call it from within smath. Foxpro is no longer supported. Why use it now instead of writing a new one from scratch that is cleaner and with all the stuff we collectively might wany.
Thing is the US Imperial shapes and Metric equivalents are 1996 rows by 75 columns currently. I like the idea of having the Euro shapes in there as well, more to the spirit of SMath.

Thanks again
Dennis
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline sinneD  
#10 Posted : 16 November 2015 20:39:53(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)
So far, the best way that I have found to push and pull the info I need is using the excel_IO functions.
Test_AISC.sm (68kb) downloaded 63 time(s).
aisc.xlsm (27kb) downloaded 78 time(s).



I have attached the small SMath file that calls the aisc.xlsx spreadsheet that I wrote.

By simply defining the shape and the property and then sending those to Excel, we can then pull the result of the search back into SMath.

This is assuming that you have already installed the AISC_Search tools.

What I would really like to be able to do is do the lookup directly. I think it would be very advantageous to be able to use the information as published directly form AISC.

Conversely, how is this type of data available to our European friends? What do the Eurocodes present to you if anything at all? I know that the producers provide some of the information.

Edited by user 16 November 2015 20:49:11(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 1 user thanked sinneD for this useful post.
on 18/11/2015(UTC)
Offline RFreund  
#11 Posted : 28 November 2015 18:54:18(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 - sorry for the lack of involvement, I was really swamped at work before the Thanksgiving break. I have just got a chance to look into all of this.

A few questions:

In regards to using excel - It is difficult to use the property lookup spreadsheet because, as far as I know, you can only look up one property, right? What I'd rather do is pull in the entire row into SMath and then assign all the properties I need from that row of information. The hard part about this is that somehow you must utilize "VLookup" or something similar in excel. Or maybe there is another way around this? This is the problem I ran into last time, so ultimately I pulled all of the "W" shape properties into SMath and used "findrow" in Smath. This creates a very bulky .sm file though.

My programming skills are very minimal unfortunately so I'm not sure I'd be much help on the wrapper. Although if there is some documentation to how this can be done I'd be happy to try and give it a shot.
Offline RFreund  
#12 Posted : 28 November 2015 19:08:34(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)
I noticed I said "VLookup" but really I need the entire row. VLookup would actually be pretty simple to implement, but maybe I need index?

EDIT:

I have (almost) achieved what I was hoping to. I have used multiple "Vlookups" so that the entire row can be exported back to SMath however I am having a hard time getting everything to "run smoothly". I'm not sure what I am doing wrong.

I have Windows 10, excel 2013. Maybe there is a permissions issue.

Can anyone get this to run correctly on their machine? See attached.
Lookup Properties.zip (1,012kb) downloaded 39 time(s).

Edited by user 28 November 2015 20:23:53(UTC)  | Reason: Found a way to use VLookup with excel and SMath

Offline Alex M.  
#13 Posted : 30 November 2015 04:34:25(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
however I am having a hard time getting everything to "run smoothly". I'm not sure what I am doing wrong. Lookup Properties.zip (1,012kb) downloaded 39 time(s).


What are you referring to when you mention smoothly?

If it is related to my plugin I can try to help.

If you are relating that VLookup is slow, Index(Match) is a little faster, see attached.
AISC Shape Lookup.zip (1,074kb) downloaded 52 time(s).

SinneD, I have modified the plugin so all numeric text values are converted to number, not a string. Should help, I would think

Edited by user 30 November 2015 05:07:44(UTC)  | Reason: Not specified

Offline RFreund  
#14 Posted : 30 November 2015 05:11:03(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)
Sorry I should have been more specific, I couldn't seem to figure out what was going on.

Everything seems to run fine when I open and close the program. However if I change the shape and try to re-calculate nothing happens. However if I save and close SMath (with the changed shape), then open it, everything re-calcs appropriately.

Is there a way to "re-calculate" without opening and closing?

Thanks!
Offline Alex M.  
#15 Posted : 30 November 2015 05:16:03(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
Sorry I should have been more specific, I couldn't seem to figure out what was going on.

Everything seems to run fine when I open and close the program. However if I change the shape and try to re-calculate nothing happens. However if I save and close SMath (with the changed shape), then open it, everything re-calcs appropriately.

Is there a way to "re-calculate" without opening and closing?

Thanks!


Try executing excel_VISIBLE on the .xls file of interest. Than go to excel -> file-> options -> formulas and check if re-calculation is enabled. If it is not, you are using old version of excel plugin that has a bug of disabling recalculation. Delete the plugin and re-download it - that should do the trick.

Also if xls file needs any permissions to operate (macro?) you should allow them by hand. Excel_IO plugin does everything in a "quiet" mode, so you will see no prompts or pop-ups (they will drive you nuts with sufficient number of function calls).

P.S.: all works on my side

Edited by user 30 November 2015 05:20:13(UTC)  | Reason: Not specified

Offline sinneD  
#16 Posted : 04 December 2015 19:56:53(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)
Ryan-

I am curious as to why you are taking the approach of vlookup? you will need to know the column for the info that you require- a bit risky because if you are off or something changes, the reference you are relying on can change.

Alex- I will update my plugin and try your suggestions.

Can you think of a way to do column vectors with ordinates and units? For example I want to define the following variables as a column vector in SMath, then pass to Excel, do some work then bring the resulting values back to SMAth to do more work. It would be advantageous to be able to have units built in.

For example the 6 row vector defining variables for shape size, area, weight, and 3 physical properties.

Shape
A
W
Sx
Zx
Ix

Pass that 1x6 array to Excel.

Excel then uses the first argument to find values for A, W, Sx, Zx, and Ix.

Return 1x5 that to SMath. As a single operation it works.

But when I try to use it to define variables, then it gives me a syntax error.

aisc.xlsm (39kb) downloaded 37 time(s).Excel-2.1-Capture.PNG Test_AISC.sm (244kb) downloaded 26 time(s).

Edited by user 04 December 2015 22:06:55(UTC)  | Reason: Typo

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Alex M.  
#17 Posted : 04 December 2015 22:04:06(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: sinneD Go to Quoted Post
For example I want to define the following variables as a column vector in SMath, then pass to Excel.


The calcbook you attached actually does do it. The issue here is that you are trying a "nested" definition of variables. You can assign the output from EXCEL to a single matrix "A" but you cannot assign very same output to a matrix of undefined variables.

What you can do is to use function el(), say variable:=el(A,1)

Originally Posted by: sinneD Go to Quoted Post
It would be advantageous to be able to have units built in.


Please elaborate what do you mean here - will do my best to help.

Also it would be helpful if you would attache EXCEL files to the post that do not require special .dll files to run.

Also if you are interested, there is a better way to display excel screenshots in your calcs (usin my plugin excel_PNGv2)

Edited by user 04 December 2015 22:12:20(UTC)  | Reason: Not specified

thanks 1 user thanked Alex M. for this useful post.
on 04/12/2015(UTC)
Offline sinneD  
#18 Posted : 04 December 2015 22:26:55(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-

You replied as I was editing.

I though that we could define a group of variables as a column vector. Now that I try it I see that it does not work...

That is the last bit of the worksheet that I posted.

EDIT: i am still trying to figure out the PNG function of the plugin.

custom .dll- yes it is a custom dll that i am trying to utilize. its a search function and database provided by the material code governing body with their data. its free and redistributable.

i was trying to figure out how to use the dll directly with SMath but the responses above tell me its above my ability with programming, so I am stuck with making Excel do my heavy lifting.

for years working with excel we had to rely on tedious row/column lookups. a very clever fellow wrote a foxpro database and search function and wrapped it into a dll so that we can call it as

That is how Ryan is doing the data lookup in his spreadsheets. It works, but it is challenging and tedious and can be easily broken with typos.

Once the dll is installed, then by enabling the VBA macro one can simply call the functions like this within excel-

=AISC(Shape,Prop)

to get the right information.

That is what I am trying to do in my excel spreadsheet. Its not the most elegant way, but much cleaner than big datatables and spreadsheet lookups.
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline sinneD  
#19 Posted : 04 December 2015 22:52:01(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)
I am trying to find a more efficient and simpler way to define variables.

I started out hoping that I could just call the dll from SMath directly.

something like

#include "AISC_Search.DLL"

and then use it like we do in Excel-

Zx:= AISC(W12x50,Zx)

but since everyone who has weighed in so far says its not possible, I am using excel to do it for me.

I will try to explain what I am doing like this-

Excel-2.2-Capture.PNG
Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Alex M.  
#20 Posted : 04 December 2015 23:50:42(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)
Little late with my reply, but here how you can use PNG in your calcs if you choose to (see attached).

Also you can include the units if they are defined properly in excel file (update plugin). See attached.
AISC Shape Lookup.zip (1,950kb) downloaded 82 time(s).
Users browsing this topic
Guest
3 Pages123>
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.