CoCreate User Forum

CoCreate User Forum (https://www.cocreateusers.org/forum/index.php)
-   CoCreate Drafting (https://www.cocreateusers.org/forum/forumdisplay.php?f=8)
-   -   Problem with delete_elem_info (https://www.cocreateusers.org/forum/showthread.php?t=8261)

vpapa 01-03-2017 02:08 AM

Problem with delete_elem_info
 
Hi Boys,
i have added new info with this command:

ADD_ELEM_INFO 'idBusinessData:100' SELECT GLOBAL ALL CONFIRM END

and is ok.

But for remove this i try with
DELETE_ELEM_INFO INFO_NAMESPACE 'Default' 'idBusinessData:100' SELECT GLOBAL ALL CONFIRM END

DELETE_ELEM_INFO but not work
Is possible retreive me the syntax example of command ?

Andy Poulsen 01-05-2017 02:39 PM

Re: Problem with delete_elem_info
 
Hi,

There are at least two different ways to remove INFOs from elements.

The DELETE_ELEM_INFO command deletes *ALL* of the INFO strings from the selected elements (which may or may not be a problem). If you only want to remove the "idBusinessData:100" INFO string, you should use the CHANGE_ELEM_INFO command.

Also, you only need the INFO_NAMESPACE option to delete if you used it when creating the INFO string.

So, if you wanted to delete all of the INFO strings for elements that had an INFO string of "idBusinessData:100" you could use the following command:

Code:

DELETE_ELEM_INFO SELECT GLOBAL INFOS 'idBusinessData:100' CONFIRM END
Or, if you just wanted to remove that INFO string from every element, you could use the following command:

Code:

CHANGE_ELEM_INFO 'idBusinessData:100' '' SELECT GLOBAL INFOS ALL CONFIRM END
What this does is change the INFO string from 'idBusinessData:100' to '' (an empty string), which deletes the INFO string. Note that instead of ALL in the above command, you could specify an info string to search for, in which case the info strings would be deleted for matching elements.

I hope this helps!

andy


All times are GMT -8. The time now is 01:12 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.