PDA

View Full Version : Annotationdrawing exist or not exist in workmanager. Wich macro-command ?


erikkooyman
01-26-2004, 05:50 AM
I want to know in my macro of an annotationdrawing exist or not exist as document in workmanager.
The only solution I know is the command SD-AM-INQ-GLOBAL-INFO-ATTRIBUTES.
The returnvalue is a list of info's.
When the info "EDM-P:" exist 2 times, then the drawing exist in workmanager. When the info "EDM-P:" exist 1 time, the drawing exist NOT in workmanager.
This is a complex solution.

The command "get_info_wmdrawing" gives only the editor and not a returnvalue.

Is there a better solution ?

Thanks.

An example how I get the information :

(setf Counter 0)
(setf InfoList (SD-AM-INQ-GLOBAL-INFO-ATTRIBUTES))
(dolist (info_item InfoList)
(if (search "EDM-P:" info_item)
(progn
(setf Counter (+ 1 Counter))
(if (= Counter 2)
(display "Annotationdrawing exist in WorkManager")
);if
);progn
);if
);dolist

Thom Ivancso
01-26-2004, 09:36 AM
Hello Erik,

If you could attach your macro to your post, it would help others reading it to get a better idea of what you are trying to do with your code. This will help with the replies you receive.

Cheers
Thom

Wolfgang
01-29-2004, 04:03 AM
it sounds strange to me that EDM-P info exist 2 times. I found 4 different EDM infos in a couple of files (one example):

EDM-E:B4B2VFLK27Y5WK
EDM-P:B4B2VFL627Y5WK
EDM-X:DATA_B4B2VFL627Y5WK
EDM-Y:DATA_B4B2VFLK27Y5WK

looking for EDM-P: should be enough IMHO. A check whether the ELID given is a valid one might be an additional criteria.

Would you like to show us how these infos look like in your cases?

Wolfgang
02-03-2004, 06:57 AM
Hi Erik,

here comes the short way:

(let (EDM-P)
(setf EDM-P (oli::sd-execute-annotator-function :fnc
"LET Dummy (DOCU_WRITE_LINE_TO_SD (DOCU_CSTRING_TO_LSTRING (DOCU_PART_INQ_INFO_WILD '/' 'EDM-P:*')))"))
(when (and (string/= "" EDM-P)
(>= (length EDM-P) 20)
)
(display "Annotation drawing have been stored to a Database")
)
)

let us know whether you could solve the problem and how.