Skip to main content
Version: Next

REMOVE PICTURE FROM LIBRARY

REMOVE PICTURE FROM LIBRARY ( picRef | picName )

ParameterTypeDescription
picRef | picNameLongint, StringReference number of Picture Library graphic or Name of Picture Library graphic

This command is not thread-safe, it cannot be used in preemptive code.

Description

The REMOVE PICTURE FROM LIBRARY command removes from the Picture Library the picture whose reference number is passed in picRef or whose name is passed in picName.

If there is no picture with that reference number or name, the command does nothing.

4D Server: REMOVE PICTURE FROM LIBRARY cannot be used from within a method executed on the server machine (stored procedure or trigger). If you call REMOVE PICTURE FROM LIBRARY on a server machine, nothing happens—the call is ignored.

Warning: Design objects (hierarchical list items, menu items, etc.) may refer to Picture Library graphics. Use caution when deleting a Picture Library graphic programmatically.

Example 1

The following example deletes the picture #4444 from the Picture Library.

 REMOVE PICTURE FROM LIBRARY(4444)

Example 2

The following example deletes from the Picture Library any pictures whose names begin with a dollar sign ($):

 PICTURE LIBRARY LIST($alPicRef;$asPicName)
 For($vlPicture;1;Size of array($alPicRef))
    If($asPicName{$vlPicture}="$@")
       REMOVE PICTURE FROM LIBRARY($alPicRef{$vlPicture})
    End if
 End for

See also

GET PICTURE FROM LIBRARY
PICTURE LIBRARY LIST
SET PICTURE TO LIBRARY