How to create user-defined property for an database objest

Guest
Dear all:

I am writing a skill code for circuit. I want to store the resistor as
a user-defined property
of shape object. So I can access it by Objest~>resistor.

Now I do not know how to create the user-defined property for it.

Thank you for reading this

best wishes

Jack
 
From the DOCs

dbCreateProp(
g_object
t_name
t_propType
g_value
)
=> d_prop / nil

Creates a scalar property for an object. If a property named t_name already
exists on the specified object, it returns nil.


Bernd

yujie29@gmail.com wrote:
Dear all:

I am writing a skill code for circuit. I want to store the resistor as
a user-defined property
of shape object. So I can access it by Objest~>resistor.

Now I do not know how to create the user-defined property for it.

Thank you for reading this

best wishes

Jack
 
On Thu, 04 May 2006 13:14:49 +0200, Bernd Fischer <""bernd.fischer\"@xignal-A%&HY%$v#&G=.de"> wrote:

From the DOCs

dbCreateProp(
g_object
t_name
t_propType
g_value
)
=> d_prop / nil

Creates a scalar property for an object. If a property named t_name already
exists on the specified object, it returns nil.


Bernd
Or just use object~>resistor=value - i.e. on the left side of an assignment. This will create or replace the property,
using a propType inferred from the value assigned.

Andrew.
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top