I'm using Cadence 5.1 and am trying to make some schematic symbols that display context dependent information when instantiated. Onthe symbol itself, I have several ILLabels such as "ilInst~>myvar" and I have edited the cdf such that "myvar" contains some skill code that evaluates to the string of what I want displayed on the symbol. I'm accessing the data about the selected instance through expressions like "cdfgData->width->value". Much of this is based on code I've seen used elsewhere and I've just adapted it to suit my needs.
So I'm running aground because I don't know how to access the instance name (as opposed tthe cell name) within an expression. I've already tried cdsName() but that does not return the current instance name of the selected instance. Can anybody out there please provide me with the skill magic to do this. I figure it has to be available via cdfgData but I don't the access name. Many thanks in advance.
Wow - that was quick! However, it didn't work :-(. Perhaps a clarification is in order. On my symbol I have an ILLabel "ilInst~>iname". In the cdf for the cell I have declared the parameter iname, and the default value of iname is a somewhat lengthy skill code expression that contains the line:if( sameWidth&&sameLength cdfgData->iname->value=\"\" cdfgData->iname->value=ilInst~>name ) i.e. based on the conditional 'sameWidth&&sameLength' iname will either evaluate to a null string or what I hope to be the instance's instance name. I implemented your suggestion of accessing the instance name via "ilInst~>name" in the line of code above, however the current instance name is NOT displayed. If I select the instance and do a query, I see that the instance name on the form and the instance name displayed as a result of the expression are not the same.Looking forward to your next answer!Thanks,Mick.
Make that "Looking forward to *anybody's* next answer"...
How about using an NLPLabel with a value like this: [@instanceName]
The NLPLabel will display the value of attributes on the object. You could replace instanceName with any attribute that would be found in the instance.
Nice avatar :-).
So using that NLPLabel is only good for a *persistent* display of the instance name. The label I'm trying to make *conditionally* displays the instance name. Hence I need access to a way to determine the instance name from within the expression previously cited so I can subsequently choose to display it or not. I was hoping access to the instance name would be available in cdfgData but I'm not sure. My experience level with skill isn't so good, but I'm great at modifying existing code when I can see the context.