Question about new StandardPointGroupQuery() in Python

How can I write this line in Python?

StandardPointGroupQuery standardQuery = new StandardPointGroupQuery();

This is written in C#
I created a group and want to add properties to it to include points
Any Help



import clr

# Add Assemblies for AutoCAD and Civil 3D APIs
clr.AddReference('acmgd')
clr.AddReference('acdbmgd')
clr.AddReference('accoremgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')
clr.AddReference('AeccPressurePipesMgd')
clr.AddReference('acdbmgdbrep')
clr.AddReference('System.Windows.Forms')
clr.AddReference('ProtoGeometry')

# Add standard Python references
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import os
import math

# Add references to manage arrays, collections and interact with the user
from System import *
from System.IO import *
from System.Collections.Specialized import *
from System.Windows.Forms import MessageBox

# Create an alias to the Autodesk.AutoCAD.ApplicationServices.Application class
import Autodesk.AutoCAD.ApplicationServices.Application as acapp

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references for PropertySets
from Autodesk.Aec.PropertyData import *
from Autodesk.Aec.PropertyData.DatabaseServices import *

# Import references for Civil 3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil import FeatureLinePointType

# Import Dynamo Geometry reference
import Autodesk.DesignScript.Geometry as DS

adoc = acapp.DocumentManager.MdiActiveDocument
cdoc = CivilApplication.ActiveDocument
ed = adoc.Editor

output = []

# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

with adoc.LockDocument():
    with adoc.Database as db:

        with db.TransactionManager.StartTransaction() as t:
            # Place your code below
            # 
            #
            bt = t.GetObject(db.BlockTableId, OpenMode.ForWrite)
            btr = t.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite)
            siteG = CivilApplication.ActiveDocument.PointGroups
            #siteGctr = CivilApplication.ActiveDocument.PointGroups.Add("aaa")
            site = cdoc.PointGroups["aaa"]
            pointGroup02 = t.GetObject(site,OpenMode.ForWrite)
            Standar = Autodesk.Civil.DatabaseServices.StandardPointGroupQuery()
            
                
               
				  
                        
                 

            # Commit before end transaction
            t.Commit()
            pass

# Assign your output to the OUT variable.,dir(siteGctr)
OUT = pointGroup02,dir(pointGroup02)


code with c#

StandardPointGroupQuery standardQuery = new StandardPointGroupQuery();
                        //standardQuery.IncludeElevations = "100-200";
                        standardQuery.IncludeFullDescriptions = pStrRes.StringResult;
                        //standardQuery.IncludeNumbers = ">2200";
                        //standardQuery.ExcludeElevations = "150-155";
                        //standardQuery.ExcludeNames = "BRKL";
                        standardQuery.UseCaseSensitiveMatch = true;
                        //knowledge.autodesk.com/support/civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Civil3D-DevGuide/files/GUID-55A8758C-41DF-47F6-A762-F9B87FAA1A54-htm.html
                        pointGroup.SetQuery(standardQuery);
                        pointGroup.Update();

StandardPointGroupQuery.dyn (6.2 KB)

Python Script for StandardPointGroupQuery

SOLUTION



import clr

# Add Assemblies for AutoCAD and Civil 3D APIs
clr.AddReference('acmgd')
clr.AddReference('acdbmgd')
clr.AddReference('accoremgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')
clr.AddReference('AeccPressurePipesMgd')
clr.AddReference('acdbmgdbrep')
clr.AddReference('System.Windows.Forms')
clr.AddReference('ProtoGeometry')

# Add standard Python references
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import os
import math

# Add references to manage arrays, collections and interact with the user
from System import *
from System.IO import *
from System.Collections.Specialized import *
from System.Windows.Forms import MessageBox

# Create an alias to the Autodesk.AutoCAD.ApplicationServices.Application class
import Autodesk.AutoCAD.ApplicationServices.Application as acapp

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references for PropertySets
from Autodesk.Aec.PropertyData import *
from Autodesk.Aec.PropertyData.DatabaseServices import *

# Import references for Civil 3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil import FeatureLinePointType

# Import Dynamo Geometry reference
import Autodesk.DesignScript.Geometry as DS

adoc = acapp.DocumentManager.MdiActiveDocument
cdoc = CivilApplication.ActiveDocument
ed = adoc.Editor

output = []

# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

with adoc.LockDocument():
    with adoc.Database as db:

        with db.TransactionManager.StartTransaction() as t:
            # Place your code below
            # 
            #
            bt = t.GetObject(db.BlockTableId, OpenMode.ForWrite)
            btr = t.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite)
            siteG = CivilApplication.ActiveDocument.PointGroups
            #siteGctr = CivilApplication.ActiveDocument.PointGroups.Add("aaa")
            site = cdoc.PointGroups["aaa"]
            pointGroup02 = t.GetObject(site,OpenMode.ForWrite)
            Standar = StandardPointGroupQuery()
            Standar.IncludeFullDescriptions = "QW"
            Standar.UseCaseSensitiveMatch = True
            pointGroup02.SetQuery(Standar)
            pointGroup02.Update()
            #site = cdoc.PointGroups[0]
            #siteOP = t.GetObject(site, OpenMode.ForRead)
            #siteOPN = siteOP.Name
            #pointGroup01 = cdoc.PointGroups.Add("AAA")
            #pointGroup02 = t.GetObject(pointGroup01, OpenMode.ForWrite)
            #customPointGrpQry = pointGroup02.CustomPointGroupQuery()
                
               
				  
                        
                 

            # Commit before end transaction
            t.Commit()
            pass

# Assign your output to the OUT variable.,dir(siteGctr)
OUT = Standar,dir(Standar)

![GP|690x208](upload://rA5N1yuj1yWr0npg9KOKN27A47p.jpeg)