PDA

View Full Version : how get reference values


alexniccoli
06-06-2006, 04:55 AM
Hi all
I'm trying do get a value of a reference from lisp code.
If in annotation i have a drawing with a titleblock and this titleblock
has some references to Database attributes,i'd like to get programmatically
a value of an attribute that comes from Model Manager.

Thanks a Lot.
Alessandro Niccoli

Marten
06-06-2006, 11:33 AM
Hi Alessandro,

These values are stored inside logical tables in Annotation. I haven't found any lisp-functions to inquire those values, so I created my own macro to read them.

I attached two files which do this. One lisp macro, and one ME10 macro. You need to load both files. The ME10 macro can be loaded with code like this:
(oli::sd-execute-annotator-command :cmd "INPUT ('c:\\path\\file.m')")

After the files are loaded you can call the lisp-macro with a field name. The macro only searches for values in the 'tr'-group (if you need another group, you will have to modify the ME10 macro).

One extra note: Values of a group will not be passed to Annotation when there are no text-references which uses it, so you will need at least one text-reference to a column of the group.

hth.

Regards,

Marten Verhoeven

alexniccoli
06-07-2006, 02:52 AM
chapeau
Thanks a Lot
Alessandro Niccoli