Export Many Methods?

David Ringsmuth (6/2/14 10:21AM)
Joshua Fletcher (6/2/14 8:35PM)
Joshua Fletcher (6/2/14 8:38PM)


David Ringsmuth (6/2/14 10:21 AM)

Bob,

Export methods at once!

ARRAY TEXT($Method_Names_at;0)
METHOD GET NAMES($Method_Names_at)

SORT ARRAY($Method_Names_at)

//BB_ThInit (Size of array($Method_Names_at);"Exporting "+String(Size
of
array($Method_Names_at))+" Methods")
For ($i;1;Size of array($Method_Names_at))
//BB_ThUpdate ($i)

If ($DocRef_Log_h#?00:00:00?)
SEND PACKET($DocRef_Log_h;$Method_Names_at{$i}+$CR)
End if

C_TEXT($MethodText;$Method_t)
$MethodText:=""
METHOD GET CODE($Method_Names_at{$i};$MethodText)
C_DATE($ModDate)
C_TIME($ModTime)
METHOD GET MODIFICATION DATE($Method_Names_at{$i};$ModDate;$ModTime)

?//Make the special characters in method names valid for filenames.
$Method_t:=Replace string($Method_Names_at{$i};"*";"~a")
$Method_t:=Replace string($Method_t;"ï";"~b")
$Method_t:=Replace string($Method_t;"?";"~c")

$DocPath_t:=$Folder_t+$Method_t+".txt"
$DocRef_h:=Create document($DocPath_t)
If (ok=1)
SEND PACKET($DocRef_h;$MethodText)
CLOSE DOCUMENT($DocRef_h)
SET DOCUMENT
PROPERTIES($DocPath_t;False;False;$ModDate;$ModTime;$ModDate;$ModTime)
End if
End for

-----Original Message-----
From: 4d_tech-bounces@...
[mailto:4d_tech-bounces@... On
Behalf Of bob.miller@...
Sent: Monday, June 02, 2014 9:49 AM

Hi Everyone,

Anyone know of a way to export a bunch of methods at once, instead of
opening each one and selecting "Export Method" from the "Method" menu?

Bob Miller
Chomerics, a division of Parker Hannifin Corporation

Joshua Fletcher (6/2/14 8:35 PM)

Hi David,

I suggest a small modification here: use METHOD GET PATHS instead of
METHOD GET NAMES. ?METHOD GET NAMES only gives you project
methods...or maybe you only want Project methods (understandable) but
then just be clear what the code does.

Thanks!

-Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>EExport methods at once!
/color>

Joshua Fletcher (6/2/14 8:38 PM)

I agree with Chip, drag and drop between databases is the way to do
this. ?If you haven't done this in the post-v11 world the main thing
to learn is that 4D will want to try and copy things that the methods
refer to like tables. Note you can skip all that stuff and only copy
the methods.

If down the road you want a drop-in solution to export all methods,
have a look at VC_Framework:

https://github.com/4D/vc-framework-v13

If you're not familiar with GitHub:

-Click the "Download Zip" button on the lower right.
-Extract the contents.
-The components you need are in the "Components" folder.

Otherwise the readme on Github explains the usage.

Note: what VC_Framework does is export in the background every time
you make a change. ?If that's overkill for you, David's code will give
you a one shot export of Project methods.

Kind regards,

Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>AAnyone know of a way to export a
bunch of methods at once, instead of
opening each one and selecting "Export Method" from the "Method" menu?
/color>

Reply to this message

Summary created 6/3/14 at 5:02AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com