Merge Libraries with CDK

forum.cdk (2000-2005) & forum.td.cdk (2005-2010)
Michael Ehehalt
Germany
Posts: 43
Joined: 13 Mar 2017, 09:17
Location: Frankfurt, Germany

Merge Libraries with CDK

Post by Michael Ehehalt » 23 Mar 2007, 12:23

 Posted by:  Michael Ehehalt 

Hi,

is it possible to open an application with the cdk, merge the libraries
and save it merged in a new file?

Michael

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2069
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Merge Libraries with CDK

Post by Jeff Luther » 23 Mar 2007, 16:28

 Posted by:  Jeff Luther 

Part of your answer is yes, anyway, because it's not directly in the CDK
but would likely involve calling a couple 'hidden' SalOutline functions:
Set hOutline = SalOutlineCurrent()
Set boolReturn = SalOutlineMergeIncludes( hOutline )

You'll want to experiment (I've not done a merge/rename) but with those
and the CDK you should get most of what you want.

I've attached a zip of a NG msg. from the old NG that has a listing of
the declaration of many of those functions. There may be other msgs.
here or in the old NG on this topic too.

Best Regards,
Jeff @ PC Design
info: www.JeffLuther.net/gupta/


Attachment: undocumented SAL functions.zip

Rainer Ebert

Merge Libraries with CDK

Post by Rainer Ebert » 05 May 2010, 17:13

 Posted by:  Rainer Ebert 

Hi Jeff!

This works, but only if all inclued libraries are located in the directory
of the source file.
We have some libraries in a P:\Resource\Lib\Source directory which is
defined in the TD "Preferences", tab "Directories", group "Searching" as
"Global Path:" and "Use Global Search Path" is checked. But this seems to be
ignored by SalOutlineMergeIncludes().

My code is:
cdkApplication: CDK_App
CDK_App.InitFromFile( sSourceFile )
SalOutlineMergeIncludes( CDK_App.GetOutline() )
CDK_App.SaveOutlineAsText( sTargetFile, FALSE )
CDK_App.CloseApp()

Any solution for this?
In detail: How can I tell CDK and SalOutlineMergeIncludes() to use the
global search path?

Regards,
Rainer

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2069
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Merge Libraries with CDK

Post by Jeff Luther » 05 May 2010, 17:19

 Posted by:  Jeff Luther 

3 years later?! Rainer - I don't know of a solution, other than the obvious:
Make sure that P: folder is in the PATH; having a drive listed 'locally' in
TD's Preferences only apparently isn't used in SalOutlineMergeIncludes().

- Jeff

Rainer Ebert

Merge Libraries with CDK

Post by Rainer Ebert » 05 May 2010, 17:49

 Posted by:  Rainer Ebert 

Hi Jeff!

Yes, 3 years later! ;-))
Nice that you did not answer in 3 years but now! :-)))

Setting the path is my solution at the moment. I have a batch file which
adds the resource directory to the path and after this calls the tool to
merge the libraries. Works fine.

But there's a risk in doing so: We have one TD installation on a PC for
making bugfix releases. In this version the path may not point to P:\... but
to C:\... . So I have to ensure that on this PC an other batch file is uses.

Regards,
Rainer

Return to “td.cdk”

Who is online

Users browsing this forum: [Ccbot] and 0 guests