by firstname.lastname@example.org » Tue Jul 03, 2012 2:25 pm
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?
by tu2011 » Wed Jul 04, 2012 12:20 am
If you can, please post your file or PM so I can take a closer look at it.
by email@example.com » Thu Jul 05, 2012 7:33 am
by tu2011 » Thu Jul 05, 2012 3:53 pm
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.
- (79.33 KiB) Downloaded 100 times
by firstname.lastname@example.org » Fri Jul 06, 2012 10:08 am
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.
Who is online
Users browsing this forum: No registered users and 0 guests