I am looking for a way in which I can add a prefix to the symbols when we instantiate them in a schematicl.
I wrote the namePrefix in CDF.
Do I have to add a property in CDF.
Search in the help for instNamePrefix. You need to put this as a property on the symbol (so open the symbol for the component, and then do Edit->Properties->CellView and then add a string property instNamePrefix with the string value being the prefix you want.
I am trying to include it in a skill code when creating a symbol using dbopencellviewbytype("Lib_1" "Capacitor" "symbol" "schematicSymbol" "w").
I would like the prefix "cap"
So I included this in the code:
dst=ddGetObj("Lib_1" "Capacitor") dbBagId=dbOpenBag(dst,"a") dbReplaceProp(dst,"instNamePrefix","string","cap")
In the cdf properties:
cdfId->instDisplayMode = "instName" cdfId->instNameType = "schematic"
But its not working. Am I missing something here?
You're putting the instNamePrefix property in the wrong place. It's not in the cell property bag, but on the symbol cellView itself. So if you're doing:
cvId=dbOpenCellViewByType("Lib_1" "Capacitor" "symbol" "schematicSymbol" "w") ;...
would do the job.
The cdf properties you are setting are related to label display (the cdsName() interpreted label) and nothing to do with the instance names.
Its working now.