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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline TheWizEd  
#1 Posted : 11 July 2010 23:57:05(UTC)
TheWizEd


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2010(UTC)
Posts: 178
Man
United States

Was thanked: 19 time(s) in 13 post(s)
Is there an easier way to get a value instead of

' arg1 can contain a number, a symbol
Dim arg1 As Term() = Decision.Preprocessing(args(0), store)
Dim t As TDouble

t = New TDouble(CDbl(arg1(0).ToString))
' Do something to t
answer.AddRange(t.ToTerms())
result = answer.ToArray()
Return True
Ed

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

Offline Andrey Ivashov  
#2 Posted : 12 July 2010 00:32:47(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Are you need to convert array of Term to Double? If so, then use this:
Code:
SMath.Math.Numeric.Expression.Calculate(arg1, store).obj.ToDouble()

This will return double even if the expression in arg1 is not simplified enough yet.
Offline TheWizEd  
#3 Posted : 12 July 2010 00:39:47(UTC)
TheWizEd


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2010(UTC)
Posts: 178
Man
United States

Was thanked: 19 time(s) in 13 post(s)
Thanks.

Is there any documentation of the object model?
Ed
Offline maweilian  
#4 Posted : 12 July 2010 18:49:46(UTC)
maweilian


Rank: Advanced Member

Groups: Registered
Joined: 09/01/2010(UTC)
Posts: 102
Man
United States
Location: Oregon, USA

Was thanked: 5 time(s) in 5 post(s)
There is no systematic documentation of the object model on the wiki at this point. Documentation of the Smath API has really only just began. The sum total of documentation on the API is found here:

Developer Guide

Like you, I had also been thinking that systematic documentation of the object model would be a great asset. However, this would take a fair bit of work. Those of us that are interested in developing plugins need to document what we learn even as we learn it. In this way, the documentation on the wiki will continue to improve.

A great starting point would be to create an overall map of the object model (such as the one seen here for Excel: Excel Object Model). The detailed documentation for the objects, properties, and methods could be slowly added to the wiki over time. But an overall schematic of the object model would provide a framework to build upon.

Andrey, it would be wonderful, when you have time, if you could contribute to our knowledge of the object model. Also, it would be great to see some more demo videos (or tutorial) to demonstrate the use of the IPluginMathNumericEvaluation interface and IPluginMathSymbolicEvaluation interface.

Regards, Will

Edited by user 12 July 2010 19:29:22(UTC)  | Reason: Not specified

Will Massie
Mechanical Engineer
Oregon, USA
Users browsing this topic
Guest
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.