CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > CAM Software > Mastercam


Mastercam Discuss Mastercam software here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-15-2008, 07:51 PM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road
Setup sheet In Excel

I am using vba to give the printscreen output of mastercam to an excel file
but still i am not having success
i tried send keys
it dont work either
any one done
or there be any mastercam viewver ocx
anyone know anything in this regard...
Reply With Quote

  #2   Ban this user!
Old 12-15-2008, 08:18 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,042
Kiwi is on a distinguished road

Not sure if this is of any use......
VisualBasic book lists PrintScreen as Chr$(42). Hex value 'H2A'
Reply With Quote

  #3   Ban this user!
Old 12-15-2008, 10:04 PM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road

http://www.diycalculator.com/imgs/codes-05.gif
see the table
std ascii
i used
msgbox char$(42)
it shows "*"
which is given in table
so...
Reply With Quote

  #4   Ban this user!
Old 12-16-2008, 12:13 AM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,042
Kiwi is on a distinguished road

Copy of page, information taken from....Maybe incorrect????
Attached Thumbnails
Click image for larger version

Name:	Chr_Chart.jpg‎
Views:	145
Size:	90.9 KB
ID:	71660  
Reply With Quote

  #5   Ban this user!
Old 12-16-2008, 01:58 AM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road

i used
msgbox char$(42)
it shows "*"
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-16-2008, 02:00 AM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road

where u got that information you provided
MSDN or WEB
Reply With Quote

  #7   Ban this user!
Old 12-16-2008, 05:40 AM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,042
Kiwi is on a distinguished road

The Book 'Visual Basic Answers!' ISBN 0-07-211895-4.
Here is some code that will capture your screen. Too advanced for me to explain the detail. You will need to paste your 'capture' to your program.
This works with VB6, unsure if about VBA.

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const VK_SNAPSHOT = &H2C

-------------------------------------------------

Private Sub Command1_Click()
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub

Last edited by Kiwi; 12-16-2008 at 05:00 PM. Reason: deleted unnessary code
Reply With Quote

  #8   Ban this user!
Old 12-16-2008, 05:57 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,042
Kiwi is on a distinguished road

Checked code within Excel and captures screen OK, so looks like it works under VBA.
Reply With Quote

  #9   Ban this user!
Old 12-16-2008, 06:52 PM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road
again error but ok in vb6

when i pasted this code in vb6
it worked correctly
( I have used it before too)
but when i put in script it show this error
check this out
attached file
Attached Thumbnails
Click image for larger version

Name:	vberror.JPG‎
Views:	79
Size:	77.4 KB
ID:	71708  
Reply With Quote

  #10   Ban this user!
Old 12-16-2008, 06:55 PM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_SNAPSHOT = &H2C

'///////////////// My Global Variables //////////



' -- Start Script
Call Main()


' ////////////////////
' Sub Declaration
' ////////////////////
Sub Main()
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 12-16-2008, 07:01 PM
 
Join Date: Dec 2008
Location: INDIA
Posts: 22
sanjeevlj is on a distinguished road

even this dont work
http://word.mvps.org/faqs/MacrosVBA/PrtSc.htm
Reply With Quote

  #12   Ban this user!
Old 12-16-2008, 07:40 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,042
Kiwi is on a distinguished road

Can only suggest that MasterCam script is different to VBA.
Reply With Quote

Reply

Tags
excel setupsheet




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a simple setup sheet for X3 foxsquirrel Mastercam 9 11-21-2008 10:08 AM
Need Help!- MCX2 setup sheet???? QMI2007 Mastercam 5 07-10-2008 08:41 AM
Setup sheet in Gibbs cam binzer GibbsCAM 2 08-23-2007 08:52 AM
Setup Sheet Problem StormWerkz Mastercam 1 03-21-2007 10:24 AM
Mastercam Setup Sheet Help stampman Mastercam 6 02-26-2005 07:54 PM




All times are GMT -5. The time now is 11:47 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361