Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: PZero
  • Order by date
  1. PZero

    Return focus to app, then send a command?

    A better explanation of what I want to do is below; I have a button on a form and I need it to do the following - Check if AutoCAD is running If AutoCAD is running, maximise it and move the focus to it If AutoCAD is not running, start it and move the focus to it I'm thinking this should be...
  2. PZero

    Return focus to app, then send a command?

    Unfortunately I need to with the VBA in Acess, which deosn't support AutoCAD VBA.
  3. PZero

    Return focus to app, then send a command?

    Hi, I have a button in an access database. When I press the button I want to focus on another application, then send a command to it. Is this possible? My exact requirements are to press the button at which point some vba will run. The vba will check to see if autocad is open. If not open, it...
  4. PZero

    AtoCAD, Access and VBA

    Thanks for all your help Todd. I gave on on layout filtering in the end and instead decided to create a new layer named the same as the layout on which the block resides to filter by. A bit messier than I wanted but it does the job. Chris.
  5. PZero

    AtoCAD, Access and VBA

    What about removing blocks from the selectionset that aren't on the current layout? Is that a possibility?
  6. PZero

    AtoCAD, Access and VBA

    Does it help that I know that there will be only one block on each layout that we are trying to update? So there will be several layouts, 001, 002, 03, etv, but each layout will have one block called for example, 'TitleBlock'. Is there no way of identifying that? For example...
  7. PZero

    AtoCAD, Access and VBA

    I posted on another forum and this was one of the replies; Dim Id As Long Dim b As AcadBlockReference Id = ThisDrawing.PaperSpace.ObjectID For Each b In ssTitleBlock Debug.Print b.OwnerID If b.OwnerID = Id Then yadayada Is that workable?
  8. PZero

    AtoCAD, Access and VBA

    Thanks Todd, but it doesn't work. If set to 0 it won't select anything (nothing in model space), and if set to 1 it still selects the block on the first layout rather than the current layout. After looking around I think whats needed is a routine of some sort to filter the selection set...
  9. PZero

    DXF code 410 VBA solutions?

    Sorry, my code actually looks like the following; ' Build the filter criteria. ' BuildFilter intData, varData, -4, "<and", _ 0, "INSERT", _ 2, "TitleBlock", _ -4, "and>" _ ' Ensure a...
  10. PZero

    AtoCAD, Access and VBA

    It seems that code 410 for layouts does not work in VBA. I have posted another thread http://www.tek-tips.com/viewthread.cfm?qid=1397234&page=1 to see if I can find a solution.
  11. PZero

    DXF code 410 VBA solutions?

    I have run across a problem that seems to have come up a few times, but all links to helpful resources in those threads are dead. I am trying to select a particular block on the active layout, however due to the failings of code 410 in VBA, I can only select the block on the first layout. I'm...
  12. PZero

    AtoCAD, Access and VBA

    The layout I want to update is current before I run the script, but it still imports the record into the block on the first layout, so if I understand correctly, it can't be a problem with an existing selection set still being in memory. So I must have to modify the selection set filter codes...
  13. PZero

    AtoCAD, Access and VBA

    Todd, Thank you very much for all the help you are giving me. I have now made the following changes; On Error GoTo ExportAttribs_Error strTblName = "tblDrawings" ' Table name in database. strLayoutName = ThisDrawing.ActiveLayout.Name ' Current layout name...
  14. PZero

    AtoCAD, Access and VBA

    ...itemType = "TEXT" 'this holds the type of entity we'll be collecting fType(0) = 0: fData(0) = itemType fType(1) = 8: fData(1) = "*" 'Here you specify the layer. We'll use all layers DataSS.Select acSelectionSetAll, , , fType, fData 'now we cycle through all the layouts For Each...
  15. PZero

    AtoCAD, Access and VBA

    ...End If ' HERES WHERE I NEED TO FIND THE TAB NAME AND USE IT TO IDENTIFY WHICH RECORD TO IMPORT THE ATTRIBUTES FROM ****************** ' Collect the attributes. ' varAttribs = AttribExtract(ssTitleBlock(0)) ' Connect to the title block...
  16. PZero

    AtoCAD, Access and VBA

    By the way, to make things a bit easier and because of the nature of the data I need to handle, the primary key will be Autonumber.
  17. PZero

    AtoCAD, Access and VBA

    Hi Todd, hope you are well today. You are almost correct in what I want to achieve, of course my description becomes clearer the more I learn. All processes will be controlled from my access database, ie; a button press or other action. Command lines and scripts will then be passed to AutoCAD...
  18. PZero

    AtoCAD, Access and VBA

    ...Connect(strDatabase As String, strTableName As String) Dim strSQL As String 'SQL string for extracting recorsets. strSQL = "SELECT * FROM [" & strTableName & "]" Set cnnDataBse = New ADODB.Connection With cnnDataBse .CursorLocation = adUseServer .Provider =...
  19. PZero

    AtoCAD, Access and VBA

    I had a look for information on the error message and couldnt see anything that immediately jumped out at me, so I'm just going to forget about that part of it. I think I'll be deleting that part of the code anyway, since all I want to do is read from the database, not write to it. I'll keep...
  20. PZero

    System restarts when system tray is clicked

    I think I'll try a reinstall of XP because the automatic restart option is already off. There is no BSOD to read an error number from! Thanks guys.

Part and Inventory Search

Back
Top