parameters: (
          self,
          functionName,
          parentId,
          initialValues={},
          skipDomain=False,
          subProxyValues={},
      )
return_statement: return self.get(newProxy.GetGlobalIDAsString())
docstring: Creates a new filter/source proxy as a child of the specified
          parent proxy.  Returns the proxy state for the newly created
          proxy as a JSON object.
docstring_summary: Creates a new filter/source proxy as a child of the specified
          parent proxy.  Returns the proxy state for the newly created
          proxy as a JSON object.
docstring_tokens: Creates a new filter / source proxy as a child of the specified parent proxy . Returns the proxy state for the newly created proxy as a JSON object .
function: def create(
          self,
          functionName,
          parentId,
          initialValues={},
          skipDomain=False,
          subProxyValues={},
      ):
          """
          Creates a new filter/source proxy as a child of the specified
          parent proxy.  Returns the proxy state for the newly created
          proxy as a JSON object.
          """
          name = self.validate(functionName)
  
          if not name:
              return {
                  "success": False,
                  "reason": '"'
                  + functionName
                  + '" was not valid and could not be evaluated',
              }
  
          pid = parentId
          parentProxy = self.mapIdToProxy(parentId)
          if parentProxy:
              simple.SetActiveSource(parentProxy)
          else:
              pid = "0"
  
          # Create new source/filter
          sanitizedInitialValues = sanitizeKeys(initialValues)
          allowed = self.allowedProxies[name]
          newProxy = paraview.simple.__dict__[allowed](**sanitizedInitialValues)
  
          # Update subproxy values
          if newProxy:
              for subProxyName in subProxyValues:
                  subProxy = newProxy.GetProperty(subProxyName).GetData()
                  if subProxy:
                      for propName in subProxyValues[subProxyName]:
                          prop = subProxy.SMProxy.GetProperty(propName)
                          value = subProxyValues[subProxyName][propName]
                          if isinstance(value, list):
                              prop.SetElements(value)
                          else:
                              prop.SetElements([value])
                      subProxy.UpdateVTKObjects()
  
          # To make WebGL export work
          simple.Show()
          simple.Render()
          self.getApplication().InvokeEvent("UpdateEvent")
  
          try:
              if not skipDomain:
                  self.applyDomains(parentProxy, newProxy.GetGlobalIDAsString())
          except Exception as inst:
              print("Caught exception applying domains:")
              print(inst)
  
          return self.get(newProxy.GetGlobalIDAsString())
function_tokens: def create ( self , functionName , parentId , initialValues = { } , skipDomain = False , subProxyValues = { } , ) : name = self . validate ( functionName ) if not name : return { "success" : False , "reason" : '"' + functionName + '" was not valid and could not be evaluated' , } pid = parentId parentProxy = self . mapIdToProxy ( parentId ) if parentProxy : simple . SetActiveSource ( parentProxy ) else : pid = "0" # Create new source/filter sanitizedInitialValues = sanitizeKeys ( initialValues ) allowed = self . allowedProxies [ name ] newProxy = paraview . simple . __dict__ [ allowed ] ( * * sanitizedInitialValues ) # Update subproxy values if newProxy : for subProxyName in subProxyValues : subProxy = newProxy . GetProperty ( subProxyName ) . GetData ( ) if subProxy : for propName in subProxyValues [ subProxyName ] : prop = subProxy . SMProxy . GetProperty ( propName ) value = subProxyValues [ subProxyName ] [ propName ] if isinstance ( value , list ) : prop . SetElements ( value ) else : prop . SetElements ( [ value ] ) subProxy . UpdateVTKObjects ( ) # To make WebGL export work simple . Show ( ) simple . Render ( ) self . getApplication ( ) . InvokeEvent ( "UpdateEvent" ) try : if not skipDomain : self . applyDomains ( parentProxy , newProxy . GetGlobalIDAsString ( ) ) except Exception as inst : print ( "Caught exception applying domains:" ) print ( inst ) return self . get ( newProxy . GetGlobalIDAsString ( ) )