It is currently Thu Oct 23, 2014 1:13 pm

T-Cell and Dialog_Items

T-Cell and Dialog_Items

Postby asc8y@virginia.edu » Tue Jul 03, 2012 1:25 pm

I have a T-Cell (T1) that does or does not call a Sub-T-Cell (T2) depending on a Boolean variable (b1). The Sub-T-Cell has a further 5 variables (x1 ... x5).

For instance, if b1 = 0, then there is no need to define x1 through x5. However if b1 = 1, I query the user to define the variables. Then I generate the Sub-T-Cell.

Using LDialogItem and LC_Generate the above works perfectly for the first instance of T1. However, for further instances, when I re-query for new parameters, it changes the parameters of all instances.

Is there a way to query different parameters for different instances of a T-Cell without having to define them in the "T-Cell Parameters" tab?

Thank you,
-Allen
asc8y@virginia.edu
 

Re: T-Cell and Dialog_Items

Postby tu2011 » Tue Jul 03, 2012 11:20 pm

LDialog_Items are meant to be used in a UPI macro environment rather than a T-Cell environment. Without seeing your code, I don't have a clear picture of what is going on. So, I can't really give you definitive answer. However, from little that I can understand you from your description, it appears that you should have really written a UPI macro to call a T-Cell depending on the variable, b1, rather than using a T-Cell to call a T-Cell.

If you can, please post your file or PM so I can take a closer look at it.
tu2011
 

Re: T-Cell and Dialog_Items

Postby asc8y@virginia.edu » Thu Jul 05, 2012 6:33 am

Thanks for your response. I attached my code as txt files.
Attachments
code for T2.txt
(3.26 KiB) Downloaded 293 times
code for T1.txt
(2.3 KiB) Downloaded 291 times
asc8y@virginia.edu
 

Re: T-Cell and Dialog_Items

Postby tu2011 » Thu Jul 05, 2012 2:53 pm

Allen,

The problem why your dialog box does not pop up is because you only have 1 parameter, special_fiber, in your T1 cell, which has possible values of 0, 1, True, False. L-Edit will not run your code unless it sees that it has not generated a particular auto-generated cell with a distinct set of values. For example, say you instantiate T1 with a value of 0. L-Edit will create an auto-generated cell with a name of T1_Auto_0. The next time you instantiate with the same value, it will just pull in the already generated cell T1_Auto_0. However, if you instantiate T1 with a value of False, it will create an auto-generated cell with a name of T1_Auto_1. The reason why the dialog box pops up in this case is because the name on the auto-gen cell is different.

Here are my recommendations. If your T1 cell ultimately has only 1 parameter and you would only call wg_curve cell, then combine both of these T-Cells into one T-Cell. If you are only starting your coding and will eventually add more parameters to T1 that have possible values of double datatype, then you may continue to keep the current structure. However, keep in mind that you may still encounter the problem. For example, here is where you may see the problem arise. Lets say you add a second parameter to T1 called Size with a default value of 2. The first time you call this T-Cell with special_fiber=1 and Size=2, which prompts you with the dialog and you set the following values: w1=2, w2=4, x2=20, x1=5, and trench=3. The second time you call this T-Cell with the same top values, special_fiber=1 and Size=2, but you wish to change the lower level values, L-Edit will not pop up the dialog box because the top level auto-generated cell has already been created.

In addition, I would suggest that you make your layers, RIB1 and PM, part of the set of parameters on cell, wg_curve. This makes your T-Cell a little more robust and portable because it will allow the user to select any two layers they like. Furthermore, should you decide to rename your layers, your T-Cell will not break because it is not searching for the layer RIB1. Please see attached TDB file which has been renamed to TXT.
Attachments
TCell_subTCell2.txt
(79.33 KiB) Downloaded 299 times
tu2011
 

Re: T-Cell and Dialog_Items

Postby asc8y@virginia.edu » Fri Jul 06, 2012 9:08 am

tu2011,
Thank you again. I'm sorry I simplified the code a bit too much as I really have a number of parameters (double) in my T-Cell. You are correct that I still have the same troubles in the unabridged coding. Therefore, I took your suggestion from 7/4 and made a macro rather than a T-cell to call the sub-T-cell.

Thank you also for the suggestion regarding the layers.
-Allen
asc8y@virginia.edu
 

Re: T-Cell and Dialog_Items

Postby Alfred » Sat Oct 18, 2014 1:12 am

Thank all of you for this kind and helpful information.it 'll all of us in this kind of matter.
For investment tips and guide visit Zachary Cefarattiwebsite
Alfred
 
Posts: 1
Joined: Thu Oct 16, 2014 9:59 pm


Return to UPI and TCL scripts

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 35 on Thu Jan 09, 2014 2:15 am

Users browsing this forum: No registered users and 1 guest

Login Form