Jump to content



Featured Articles

Check out the latest featured articles.

File Library

Check out the latest downloads available in the File Library.

New Article

Product Viscosity vs. Shear

Featured File

Vertical Tank Selection

New Blog Entry

Low Flow in Pipes- posted in Ankur's blog

Prode Putn Function Missing

prode

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic
Share this topic:
| More

#1 fateton

fateton

    Brand New Member

  • Members
  • 9 posts

Posted 07 April 2017 - 03:17 AM

Now , I am introducing the name of the stream from excel form to prode editor.

For this Prode in his manual proposes PutN() functions, but this function is missing in "properties1".

I think that in the free version this function is not available but that this is included in ppp.dll.

Because of this any idea to do this?

Someone know the variable to PutN(?,?,?) I think that is possible put this function in vba and call to ppp.dll but I need the variables that uses PUTN.

thank in advance

#2 serra

serra

    Gold Member

  • Members
  • 310 posts

Posted 07 April 2017 - 07:56 AM   Best Answer

not all the methods exported by Prode Properties library have definitions in Excel VBA I think because of Excel VBA limits with strings,

for Excel VBA strings Prode includes a few specific methods as MStrN(),

the method  putN(int stream, char *name)  is available for all languages and requires a ANSI null terminated string,

to pass a ANSI C string from Excel VBA  simply declare it put a 0 end and pass the pointer as for MStrN(),

 

Public Declare PtrSafe Function PutN Lib "ppp.dll" (ByVal str As Long, ByVal name As String)

 

however take care to avoid errors with Excel which is very sensible,

for these reasons I use only the predefined methods in my Excel VBA pages (ok, no problems with other languages)


Edited by serra, 07 April 2017 - 08:22 AM.


#3 fateton

fateton

    Brand New Member

  • Members
  • 9 posts

Posted 07 April 2017 - 10:19 AM

Thanks Serrat , my problems is that I do not other languages.

Your answer was very useful for me because this answer brought me to the resolution of my problem

In any case I finally do this with the next modifications in vba

Declarations

Public Declare PtrSafe Function putN Lib "ppp.dll" (ByVal str As Long, ByVal Pos As St
ring) As Long 'metido por mi

And the next code

Dim buzz As String * 100
buzz = Left(Cells(2, 2), 50)' only define the string
res = putN(stream, buzz)'stream is the number of stream in prode editor




Similar Topics