Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Maximum length of a macro value? (https://www.kinook.com/Forum/showthread.php?t=5304)

teognost 10-06-2014 05:01 AM

Maximum length of a macro value?
 
Hi
I would like to store the content of a file in a Visual Build macro.
Is there any limit of how many chars can be stored?
I am thinking if there is a possibility the macro would contain just a part of the file content in case the text is very long.
The code is (in RunScript step):

strSVNChangesTxtFileInitialBranch=Application.Expa ndMacros("%SVN_CHANGES_TXT_FILE_INITIALBRANCH%")
Set scisc = vbld_AllMacros()("SVN_CHANGES_INITIALBRANCH_SPECIFIC_CHANGES")


Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.OpenTextFile(strSVNChangesTxtFileInitialBranch )
scisc.Value = oFile.ReadAll
oFile.Close

kinook 10-06-2014 06:31 AM

I believe the maximum length is 2,147,483,647, but performance could suffer with a value anywhere near that large. You might want to conditionally assign the macro only if the file is smaller than a certain size, or only load part of it (maybe the first 250,000 characters or 2,500 lines).
http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx
http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx
http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx

teognost 10-06-2014 09:26 AM

thanks a lot for your answer !


All times are GMT -5. The time now is 11:55 PM.


Copyright © 1999-2023 Kinook Software, Inc.