Results 1 to 6 of 6

Thread: Scrolling text in a form

  1. #1
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2015-10
    Location
    New York NY
    Posts
    1,497
    Login to Give a bone
    0

    Default Scrolling text in a form

    I am reading dwg files and extracting info from the title blocks. As there are almost 600 sheets in the set, I want to show the user my progress, but as I am using objectDBX, I can't use utility.prompt.

    Msgbox requires the user to confirm, so it is out of the question for 600 sheets.

    A locked form seems to be the best solution, but I can't figure out how to write a scrolling list of filenames to the form. I'm not sure what is the best control to use for the job, and the code to populate it dynamically from inside the read loop.

    Of course, I could make do with a progress bar, but all the code I've seen uses an API call and some very complicated declarations.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,416
    Login to Give a bone
    0

    Default Re: Scrolling text in a form

    Why can't you prompt to the command line? ObjectDbx is running in the background, but the host app is still available. Just be sure to use the escape char (vbCr) to overwrite the prev command line so you don't have fill up the text window.
    C:> ED WORKING....


    LinkedIn

  3. #3
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2015-10
    Location
    New York NY
    Posts
    1,497
    Login to Give a bone
    0

    Default Re: Scrolling text in a form

    It worked. I used

    Code:
     
    ThisDrawing.Utility.Prompt vbCr & Filename & "	  "
    I need the spaces because VBA doesn't clear the previous filename, which may have been longer.

    One problem remains: after I'm done, the command prompt does not reappear. I tried to prompt with the escape character, chr$(27) and I also tried SendKeys chr$(27). Neither worked. How can I clear the command line?

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,416
    Login to Give a bone
    0

    Default Re: Scrolling text in a form

    I wrote the following sub to address that. Use it at the end, like:
    CommandLine "Finsished processing."
    Code:
    Sub CommandLine(msg As String)
        ThisDrawing.Utility.Prompt (msg & vbCrLf & "Command: ")
    End Sub
    C:> ED WORKING....


    LinkedIn

  5. #5
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2015-10
    Location
    New York NY
    Posts
    1,497
    Login to Give a bone
    0

    Default Re: Scrolling text in a form

    Quote Originally Posted by Ed Jobe
    I wrote the following sub to address that. Use it at the end, like:
    CommandLine "Finsished processing."
    Code:
    Sub CommandLine(msg As String)
    ThisDrawing.Utility.Prompt (msg & vbCrLf & "Command: ")
    End Sub
    Is it really that simple? Fake the command prompt?

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,416
    Login to Give a bone
    0

    Default Re: Scrolling text in a form

    Yes. The command line is still there and functioning, you just overwrote the prompt with vbCr. Its not like the DOS prompt.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. 2014: Scrolling with a cursor
    By boyerd492098 in forum AutoCAD General
    Replies: 4
    Last Post: 2014-05-01, 06:22 PM
  2. Resore Scrolling Capability
    By info.6934 in forum Vault - Wish List
    Replies: 0
    Last Post: 2010-06-16, 12:45 PM
  3. Scrolling instead of pan w/ new mouse
    By johannvonspiralspine in forum Hardware
    Replies: 2
    Last Post: 2008-07-28, 07:46 PM
  4. Scrolling and New Viewports
    By KyleDasan in forum AutoCAD Annotation
    Replies: 1
    Last Post: 2007-08-16, 03:31 PM
  5. Cut Geometry, Solid form, Void form
    By mmolina in forum Revit Architecture - General
    Replies: 2
    Last Post: 2005-05-11, 09:33 PM

Posting Permissions

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