.NET

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

Query report text

171 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,963
Registered: ‎06-29-2007
Message 2 of 3 (136 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 (116 Views)

Re: Query report text

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

Correct! Thanks again.

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 or visit the Installation and Licensing Forum to get help installing your software.