CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedReporting using MS Word(VBA)

 Post Reply Post Reply
Author
GaryM View Drop Down
Newbie
Newbie


Joined: 20.Aug.2007
Location: South Africa
Status: Offline
Points: 16
Direct Link To This Post Topic: Reporting using MS Word(VBA)
    Posted: 03.Sep.2007 at 09:51
HeyaBig%20smile
 
Created a report via VBA looking at the active drawings LayerOn property. If its true it should populate the Columns and rows created via vba with only the data of the layer where their LayerOn = True. Its working fine, but its putting all the data into the report hiding the layers thats off. So instead of giving for example two pages of data, it gives me 4 pages with 2 pages of printable data.
 
The code is as follows;
 
Dim objLayer As AcadLayer
'only put unknown layer data in table
  For Each objLayer In Application.Documents cboDrawingName.Text).Layers
   If objLayer.LayerOn = True Then
      With mobjTable
        .Cell(lngRow, lngColumn).Range.Text = objLayer.Name
          lngColumn = lngColumn + 1
        .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.LayerOn)
          lngColumn = lngColumn + 1
        .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.Freeze)
          lngColumn = lngColumn + 1
        .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.Lock)
          lngColumn = lngColumn + 1
'increment the row counter
          lngRow = lngRow + 1
'column counter must begin at 1
          lngColumn = 1
      End With
    End If
  Next objLayer
 
Is there a way i can only populate the table with layer data i need?
Regards,
Gary Mansfield
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,281 seconds.