AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
Macros & Tools excel table to draft
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 37 replies
  • Subscribers 15 subscribers
  • Views 175 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

excel table to draft

Tiberiu
Tiberiu over 12 years ago
 
  • Sign in to reply
  • Cancel

Top Replies

  • Tiberiu
    Tiberiu over 12 years ago +2
    Hi all, I've made a little macro for transferring the selected area from an excel sheet as a table in draft and I would like to share it with the community. I use it mainly for BOMs. It generates…
  • Viet Anh Le
    Viet Anh Le over 3 years ago in reply to timothy +1
    Hi, Can you please reupload the code? I can't find it in this post any more. Thank you!
  • Tiberiu
    Tiberiu over 12 years ago
    Hi all,

    I've made a little macro for transferring the selected area from an excel sheet as a table in draft and I would like to share it with the community.
    I use it mainly for BOMs.
    It generates a
    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • timothy
    timothy over 12 years ago
    I tried this out and just gotta say....NICE!!
    impressive VBA and PDML skills.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timothy
    timothy over 12 years ago
    tbmale
    fyi

    I did change two lines of code to make this work better for my needs. the first change was just a preference but I diffently would keep the second change.

    1st change, the line...
    fp.writeline ("NEW NOTE /" + fname)[/i]
    was changed to...
    fp.writeline ("NEW NOTE")[/i]
    just would rather name the note myself then have some long filename for the name.

    then I changed...

    buf = buf & "Origin Offset X " & x & " Y " & y & clrf[/i]
    to
    buf = buf & "Origin Offset X " & x & ".5" & " Y " & y & clrf[/i]
    this was so the text was slightly offseted the STRA and not right on the line.  Makes it look neater.

    Anyway, Awesome code, thanks allot!!!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tiberiu
    Tiberiu over 12 years ago
    Thanks

    Feel free to change anything :)

    One neat thing would be to align numbers to the right ... :D
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Nein
    Nein over 12 years ago
    my problem is, that the macro destroy the variabel of the CHEIG....for the note the cheig is correct (in this case 4mm) but for the texp the cheig is replaced to cheig 0...what is the Problem?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Nein
    Nein over 12 years ago
    ah sorry i think i solved the problem...i defined the GLOBAL TH to PUBLIC TH...because with GLOBAL TH i had a failure and cannot run the macro...Thanks, NICE WORK!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tiberiu
    Tiberiu over 12 years ago
    Try to play with the line

     wlen(i) = wlen(i) * TH / 8

    modifying the width ratio (8) - a smaller figure means wider rows
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Nein
    Nein over 12 years ago
    ok thanks i will try
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • francis dela cruz
    francis dela cruz over 12 years ago
    Hi,

    I just saw this thread and looks it will be very helpful. I'm not a programmer or have enough knowledge in PML. Could you give it a little more explanation on how to used this? thanks.

    [QUOTE=tbmale;68754]Hi all,

    I've made a little macro for transferring the selected area from an excel sheet as a table in draft and I would like to share it with the community.
    I use it mainly for BOMs.
    It generates a
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tiberiu
    Tiberiu over 12 years ago
    Where exactly do you have difficulties?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>