Chip,

I’ve been using Pluggers API pack plugin and this method, which works fine for 
formats. It may be that OBJECT Get filter and OBJECT Get format would do what 
you want (from v15R5, according to the dox).

Jeremy



  // resolve a format name into its string

  // $1: name

C_TEXT($0;$1;$resolveName)
$resolveName:=$1
If (Substring($resolveName;1;1)="|")
        $resolveName:=Substring($resolveName;2)
End if 

C_LONGINT($i;$err)
C_TEXT($root;$filterRoot;$name;$value)
C_BLOB($res)

  //%w-533.4 no "missing parameter to plugin" message from next line
$err:=API Get Indexed Resource ("ST4D";1;$res)

If ($err=0)
        $res:=API Bag To XML ($res)
        $root:=DOM Parse XML variable($res)
        If (OK=1)
                ARRAY TEXT($names;0)
                $filterRoot:=DOM Find XML element($root;"bag/filters";$names)

                For ($i;1;Size of array($names))
                        DOM GET XML ATTRIBUTE BY NAME($names{$i};"name";$name)
                        If ($name=$resolveName)
                                DOM GET XML ATTRIBUTE BY 
NAME($names{$i};"value";$value)
                                $i:=MAXINT
                        End if 
                End for 

                DOM CLOSE XML($root)
        End if 

        $0:=$value
End if 


> On 16 Oct 2019, at 19:44, Chip Scheide via 4D_Tech <[email protected]> 
> wrote:
> 
> title says it all
> 
> Thanks
> Chip
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to