.NET

Reply
Active Contributor
chase.hochstrasser
Posts: 42
Registered: ‎07-17-2013
Message 1 of 3 (163 Views)
Accepted Solution

Query report text

163 Views, 2 Replies
12-19-2013 12:17 PM

I would like to create a text file with from a report. here is my code so far....

 

                    '' Clear the existing Query
                    Dim qryModel As QueryModel = proj.CreateQuery()
                    qryModel.Clear()

                    Dim qryBranch As New QueryBranch(Constants.JoinOperator.OperatorAnd)

                    '' Property Condition
                    Dim propertyCondition As PropertyCondition = New PropertyCondition
                    propertyCondition.JoinOperator = Constants.JoinOperator.OperatorAnd
                    propertyCondition.PropertyType = Constants.PropertyType.Layer
                    propertyCondition.ConditionOperator = Constants.ConditionOperator.ConditionEqual
                    propertyCondition.Value = "CP*"
                    qryBranch.AppendOperand(propertyCondition)
                    qryModel.Define(qryBranch)
                    qryModel.Mode = Constants.QueryType.QueryReport
                    qryModel.ReportTemplate.AddLine(":CIRCUIT@CIRCUIT")
                    qryModel.ReportTemplate.AddLine(".DWGNAME")
                    qryModel.Execute(dwgSet)
                    qryModel.Run()

 can you help me to send data to a text file?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 2 of 3 (128 Views)

Re: Query report text

12-20-2013 01:22 AM in reply to: chase.hochstrasser

Hi,

 

is that the line you are missing (based on your code):

 

      'last lines based on your code (after adding .DWGNAME):

      'define your output file

      qryModel.ReportTemplate.FileName = "C:\TEMP\ReportResult.TXT"

      'removed ... qryModel.Execute(dwgSet)

      qryModel.Run()

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
chase.hochstrasser
Posts: 42
Registered: ‎07-17-2013
Message 3 of 3 (108 Views)

Re: Query report text

12-20-2013 08:30 AM in reply to: chase.hochstrasser

Correct! Thanks again.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community