+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21
  1. #11
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,872

    Default

    Registered forum members do not see this ad.

    I suppose an alternative approach would be if the saved received drawings had filenames containing the required information.

    But again, this could lead to error as the filename would have to be correctly formatted every time.

    The only reason I suggest this point is that the company I used to work for saved every drawing with a filename containing not only the drawing number, but also the project number, project name, revision number and drawing title. Therefore I deemed it as a possible solution.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  2. #12
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,185

    Default

    Cooperation and coordination up and down the supply chain could increase efficiency in numerous areas. Modifying file naming structure to an agreed upon standard would certainly be a good start.

  3. #13
    Senior Member
    Computer Details
    comcu's Computer Details
    Operating System:
    Window 7
    Monitor:
    Dual monitors
    Using
    AutoCAD LT 2014
    Join Date
    Jun 2005
    Location
    Newcastle Upon Tyne
    Posts
    319

    Default

    Hi, everyone, i worked on this lasty night and got it to work. it basically lets you select 4 mtexts and then creates a excel sheet and saves it and then makes it visible. it then transfers the four selected fields to the avitve excel sheet then offests the active cell before transfering the next text string the current active cell. i have built into the code a section thats ends the sub if you have not selected any values. this allows the user to move into a different layout or drawing and then restart the sub. select four mtexts and then adds again to the active cell.

    i will look to incoporate seants code so it allows you to pick either attributes, text or mtext. i thought i would have to write 3 variations of the ocde to account for the different types. the other part i want to write in is to allow the user to select the number of entities selected. the code is set up to go to the next row once four values have been entered into the excel sheet. i would like to allow the user to type in the amount into the commnad line because as peoples template can differ, some times the project no is part of the drawing no meaning the would need 3 entities to select

    eg.

    Project No-DWG No
    Rev
    Title

    other times there is four to select

    Project No
    DWG No
    Rev
    Title

    I am quite pleased with it and i know it will save me a lot of time.

    one problem with it tho is it has a bug. it seems every second time the code runs it crashes on the part where the valus is transfered to excel. it was really late when i finished so i will look at it again later as i am sure it is quite simple. again forgive the code if it seems a bit messy i will look and see if i can simplify it and make it easier to read but at the minute it works so that is always my first aim.

    please comment.

    code in the next post.

    cheers,

    col

    ps i agree with you seant

    Quote Originally Posted by SEANT View Post
    Cooperation and coordination up and down the supply chain could increase efficiency in numerous areas. Modifying file naming structure to an agreed upon standard would certainly be a good start.
    but i am not in a postion to demand these things. We are a curtain Walling aluminium glazing company and the drawings we recieve are from architects. these guys are higher up the food chain so i just have to live with it and come up with ways of dealing with the issues.
    Last edited by comcu; 1st Mar 2009 at 11:16 pm.

  4. #14
    Senior Member
    Computer Details
    comcu's Computer Details
    Operating System:
    Window 7
    Monitor:
    Dual monitors
    Using
    AutoCAD LT 2014
    Join Date
    Jun 2005
    Location
    Newcastle Upon Tyne
    Posts
    319

    Default

    Code:
    Public MyTxtStr(0 To 3) As String
    Public Cnt As Integer
    Public WorkbookOpen As Integer
    Public RowCnt As Integer
    Public ErrorHandler As Error
     Public Excel As Excel.Application
    Public ExcelSheet As Object
    Public ExcelWorkbook As Object
    Public CurrRange As Range
    
    
    
    
    Sub DrgRecivedRegAutoComplete3()
    
    'allows selecting text on screen
    'stores the  text  value
    
    Dim MyMTxt As AcadMText
    Dim MyoEnt As AcadEntity
    Dim MyObjSS As AcadSelectionSet
    Dim i As Double
    
    i = 0
    '
    On Error Resume Next
    ThisDrawing.SelectionSets("Selecttext").Delete
    On Error Resume Next
            Set MyObjSS = ThisDrawing.SelectionSets.Add("Selecttext") '' create a new selectionset
                      
                
            MyObjSS.SelectOnScreen '' let user select entities interactively
            
                
    
    '      ThisDrawing.Utility.prompt objSS.Count & " entities selected"
    
               ' ThisDrawing.Utility.GetString True, vbLf & "Enter to continue Escape To Exit"
    
        
         
            
            MyObjSS.Highlight True
                If MyObjSS.Count = "0" Then GoTo ErrorHandler
            
            For Each MyoEnt In MyObjSS
            
        
            
             
             
               If TypeOf MyoEnt Is AcadMText Then
               
                    Set MyMTxt = MyoEnt
                 
                        MyTxtStr(i) = MyMTxt.TextString
                            MyObjSS.Highlight False
                              i = i + 1
                              
                             
                              
            
            
                End If
                Next
             
                Cnt = MyObjSS.Count - 1
                
    Tranfer2Excel
    
    ErrorHandler:
    
    Close
     
    End Sub
    
    Private Sub Tranfer2Excel()
    
    
    
    
      If WorkbookOpen = 1 Then GoTo SkipCreatingWorkbook
      
        ' Launch Excel.
        
        
        Set Excel = New Excel.Application
    
        ' Create a new workbook and find the active sheet.
        Set ExcelWorkbook = Excel.Workbooks.Add
        Set ExcelSheet = Excel.ActiveSheet
        
        ExcelWorkbook.SaveAs "Drawing Register Transfer Sheet.xls"
      
    Excel.Visible = True
      
     RowCnt = 1
      
          With Worksheets("Sheet1")
        .Select
        .Range("a1").Activate
            End With
        
    SkipCreatingWorkbook:
        
         For i = 0 To Cnt
            Set CurrRange = ActiveCell
                CurrRange.Value = MyTxtStr(i)
                    CurrRange.Offset(0, 1).Select
        
        Next
        
        RowCnt = RowCnt + 1
        
         With Worksheets("Sheet1")
        .Select
        .Range("a" & RowCnt).Activate
            End With
        
       WorkbookOpen = 1
       
    
            
        
        DrgRecivedRegAutoComplete3
    
    
       ' Excel.Application.Quit
        'Excel.Application.
    
       
    End Sub

  5. #15
    Luminous Being
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    5,344

    Default

    I have done this where a user picks an object you then know wether its a block or text etc in the case of text you would always pick the first answer required then next next etc it would get complicated if its a mix of blocks and text is picked.

    The answer may lie in when you pick a block you pick at the point of an attributes value it would require a bit of coding but you could check the attribute value is near to the point chosen. I am sure there is a value for attribute insertion point. repeat as required but the user picks in the required order.

    As I have said we do this now updating a block picking values off drainage long sections if the user picks the wrong ones then yes the answers will be wrong.

  6. #16
    Full Member
    Using
    Electrical 2010
    Join Date
    May 2010
    Posts
    27

    Smile vba Auto Fill For Drawing Register

    Quote Originally Posted by Lee Mac View Post
    If all the required elements are attributes in say a title block, then this could be achieved upon the click of one button - The information could also be extracted from the filename, if the filename contains any of the required info.

    I could export easiest to a csv file (just a format of excel file), as these are easiest to write to - this could then be saved as xls if you so wish... The csv file could be kept in a certain location and written to every time you open a received drawing..... then maybe, you could copy paste the info into your main drawing register to be issued.

    Just a few thoughts...
    Hi Lee,

    I was surfing the NET looking for inspiration and found the HOLLY GRAIL......

    Is this at all possible? to transfer information from AutoCAD to an EXCEL Drawing Register using Attributes??

    Any Assistance Would be Greatly Appteciated

    Best Regards

    Simon

  7. #17
    Full Member
    Using
    Electrical 2010
    Join Date
    May 2010
    Posts
    27

    Smile vba Auto Fill For Drawing Register

    Quote Originally Posted by Lee Mac View Post
    If all the required elements are attributes in say a title block, then this could be achieved upon the click of one button - The information could also be extracted from the filename, if the filename contains any of the required info.

    I could export easiest to a csv file (just a format of excel file), as these are easiest to write to - this could then be saved as xls if you so wish... The csv file could be kept in a certain location and written to every time you open a received drawing..... then maybe, you could copy paste the info into your main drawing register to be issued.

    Just a few thoughts...
    Hi Lee,

    Ihave tried to send a message twice giving a detailed description of my situation, unfortunately every time i hit the 'submit reply' button it takes me back to the login screen

    To cut a long story short......

    I was surfing the NET looking for inspiration and found the HOLLY GRAIL......

    Is this at all possible? to transfer information from AutoCAD to an EXCEL Drawing Register using Attributes??

    Any Assistance Would be Greatly Appteciated

    Best Regards

    Simon

  8. #18
    Luminous Being dbroada's Avatar
    Computer Details
    dbroada's Computer Details
    Operating System:
    Windows 7 Professional
    Computer:
    Dell
    CPU:
    Intel Xeon E5-1603@2,80GHz
    RAM:
    4GB
    Graphics:
    NVIDA Quadro K600
    Monitor:
    DELL 23" & SAMSUNG 21"
    Discipline
    Electro/Mech
    dbroada's Discipline Details
    Occupation
    Design Engineer
    Discipline
    Electro/Mech
    Using
    Electrical 2013
    Join Date
    Nov 2005
    Location
    Sussex, UK
    Posts
    5,528

    Default

    I am sure Lee will be along soon but you could also look at the data extraction tool already in AutoCAD. (Tools|Data Extraction)
    "That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
    "Everything in drafting is logical. Except what isn’t." - Gavin Guile. (from the Lightbringer series of books by Brent Weeks)

    Dave

  9. #19
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,872

    Default

    Simon, check out the Global Attribute Extractor in my sig - this thread is pretty old, but it looks like I accomplished it in the end
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  10. #20
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Jul 2011
    Posts
    20

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Lee Mac View Post
    Simon, check out the Global Attribute Extractor in my sig - this thread is pretty old, but it looks like I accomplished it in the end
    Quote Originally Posted by Lee Mac View Post
    Simon, check out the Global Attribute Extractor in my sig - this thread is pretty old, but it looks like I accomplished it in the end
    Hi LM
    first a big thanks for your global efforts in the fight against Badcad.

    I didn't want to start a new thread and found this one which I hope can get my question answered.

    I am starting a new Project which will have over 100 drawings, all with the same title block containing attributed text. I have created an excel table with column headings representing each Attribute, and wish to have one row per drawing, thus creating a title-block table in Excel.
    I wish to be able to fill in text for These attributes inside this table rather than have to open up individual drawings.

    How can I create the link to make these title block attributes read Information from this table?
    Kind of like your Global Attribute Extractor, but in reverse!

    thanks in advance for any insight anyone can give me

Similar Threads

  1. Drawing Issue Register.
    By stevsmith in forum CAD Management
    Replies: 6
    Last Post: 12th Apr 2010, 12:34 pm
  2. Drawing Register
    By streng in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 21st Jan 2009, 08:49 pm
  3. Print drawing to fill page
    By berol in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 27th Dec 2008, 12:44 am
  4. Some Thoughts...
    By Lynn Allen's Blog in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 27th Jan 2008, 01:51 am
  5. Auto fill multiple text areas
    By quasifun in forum AutoCAD General
    Replies: 4
    Last Post: 30th Apr 2007, 03:16 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts