CDK Help

forum.cdk (2000-2005) & forum.td.cdk (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

CDK Help

Post by NewsgroupServer » 06 Jun 2006, 14:57

 Posted by:  Vishwa 

Hi NG

Im new to CDK. I need to accomplish the following using CDK.

I have a few applications with a code block somewhat as below.

Set theNumber1 = 99999999999999999999999
Set theNumber2 = -3990099999099990012121
Set nTemp = SalNumberMax(theNumber1, theNumber2 )
Set dfTarget = SalNumberToStrX(nTemp,15)

No I want to change this block as below.

Set theNumber1 = 99999999999999999999999
Set theNumber2 = -3990099999099990012121
Set nIndex = 0
While nIndex < NO_OF_ITERATIONS
Set nTemp = SalNumberMax(theNumber1, theNumber2 )
Set nIndex = nIndex + 1
Set dfTarget = SalNumberToStrX(nTemp,15)

Here the line that needs to be moved inside the while loop is not same
always, here it is "Set nTemp = SalNumberMax(theNumber1, theNumber2 )'.
It may be something else in another application.
Also the lines above the "Set nTemp = SalNumberMax(theNumber1, theNumber2 )"
may not be same. Here there are two line above, but in some cases it could
be more/less than that.

My basic requirement is to find for a line containing a function which is
known only at runtime and move it inside a loop as above.

I have idea about using the GetActions, InsertAfter/Before, Indent, Find
etc, but Im unable to use them properly to proceed further.

A brief description of the steps to achieve this or a code sample would be
great.

Thanks in Advance
Vish.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

CDK Help

Post by NewsgroupServer » 06 Jun 2006, 19:21

 Posted by:  Jeff Luther 

"I have idea about using the GetActions, InsertAfter/Before, Indent, Find
etc, but Im unable to use them properly to proceed further.

A brief description of the steps to achieve this or a code sample would be
great."

Here's how I can help you if you help me: put together a small test demo.
appl. of what you have - I don't have precise code that I can paste here,
but with something 'sort of' close from you, I and others might well be able
to help fill in the pieces. You have the basic calls you'll need listed above,
so sounds like you are close.

Best Regards,
Jeff Luther/PC Design
info: www.pulpcards.com/gupta/

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

CDK Help

Post by NewsgroupServer » 07 Jun 2006, 09:12

 Posted by:  Ingo Pohl 

Not sure what you mean but maybe you should look at the Help for
SalCompileAndEvaluate...

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

CDK Help

Post by NewsgroupServer » 07 Jun 2006, 13:36

 Posted by:  Vishwa 

Hi Jeff and Ingo

Thank you both for your responses. I am almost there and will get back if I
face any new issues :-)

Regards
Vish.

Return to “td.cdk”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests