Jump to content
Macro Express Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Cory

  1. When I want to see if a file changes I use HTTP Methods which you can do in an external script. The HTTP request will get you the whole file but there's a method that will only return the headers called "HEAD". The response headers usually have a "Last-Modified header. I just did one on my websites logo and I can see it was last modified on "Sun, 28 Feb 2021 00:24:18 GMT". I would cast that in the script to a decimal or longest-to-shortest text date format and compare. With this you can see if a file has changed without having to download it. If you don't want to do an external script, you could download the file and check it's metadata for a creation date tag.
  2. Do you mean compare two graphics files on a web server?
  3. If you're talking about connecting to another desktop you might mean Remote Desktop. But RDP needs to have an open active session for macros to run. RDP has a "remote session". VNC is what I used to connect to the connect to the "console session" and it will run macros even when disconnected.
  4. No. But there are other utilities you can use to do that. Probably somehting could be done in an external script. What are you attempting to do?
  5. It's simple. TT (Text Type) Shift+RightArrow and copy then TT Delete. If the decimal value of the letter is between 97 and 122 subtract 32 else add 32. TT new character and TT ArrowLeft
  6. I wouldn't use a macro. I'd create a parallel column and have Excel do the calculation. Then copy that column and paste it back over the old column with the "Paste as values" option.
  7. Oh, I often post two code boxes, one for the command text and one for the actual commands so others can easily copy and paste useful commands into their macro. But if it's more than a few lines, I recommend creating a demo macro that is as simple as possible to demonstrate your problem, export it to a MEX file and upload that file as a message attachment. Also things like variable definitions, scopes, activations and more are preserved which will not come across be copying the commands. The easier you make it for us, the more help you will receive.
  8. Highlight what you want, right click on the selection in the scripting editor and select "Copy command text".
  9. I think you want to use the "Macro Run" command to run the macro like a subroutine. You can also control which variables you pass to that macro in the "Make this variable available to macros called by this macro" option in the variable definition.
  10. I woudl use Text File Process to go though each line. On the 6th and 10th line and each interval there after I'd find the first occurrence of the space and take only the characters up to that. So if the space was at 4, take the substring 1 though 3. This is assuming the line counts are consistent.
  11. Great. Then simply add the command to focus the window, execute the script command in the command window, then delete the script file. You will want a delay in there I think so that the deletion happens after the script has been read by BricsCAD, but not necessarily executed.
  12. Or try this... Create a macro that focuses the BricsCAD window then types a letter. If the letter ends up in the command box every time, then there's no need to use controls. But try different states of BricsCAD first. Like try being in the drawing space, menus, or whatever before execution of the macro. Sorry, but I don't have the application so I don't know what it takes to get to the command line control in BricsCAD.
  13. What options do you have to run a script in that program? I was skimming this article and a script can be run from the command line. But if there's any other options, check those out. Assuming the SCRIPT command can only be run from the command line, I'd have MEP focus the command line control and send text to it to run the script. Do you have experience with the Windows Controls commands? Some find the concept difficult to understand at first, but it's the best way to do things in MEP. Many people here avoid them, but in this case it's going to be hard to make sure the command line control is focused after the script runs and it is probably difficult to do that without. In BrisCAD start the Get Control command and click the Launch Utility. In the Capture Window Control box click the little purple crosshairs and drag it around your BrisCAD. See if when you hover over the command line box if it gets it's own highlighted red box around it.
  14. Looks simple enough to create in MEP. Do you understand how to create the lines in MEP? Can you edit attributes also? Are the blank line you hitting the Enter key to accept a default? You might consider typing in the values explicitly if so in case any of them are 'sticky'. By that I mean remembering your last selection. Because someday you might choose something different in one of those and hose yourself when you later run the script.
  15. I was thinking.... Maybe you could insert a block and edit it's attributes manually. Then copy the command sequence text and post it here. Make it a dummy block and make it as simple as possible. Maybe do this. FYI I might be indisposed later tonight and tomorrow, so my responses might be delayed. Good luck.
  16. Attached is a simple macro to illustrate ASCII File Process to create a script file with a sample input and output. I can't remember the syntax in AutoCAD so I'm just going to make up one. You can change the text to whatever you want. Say the command to create a line was the word "Line" followed by the coordinates of both ends. The idea being this would be just like what the user woudl type into the command box and can be run at once as a script in AutoCAD. The input file is a few lines with the X and Y of the ends of the lines. E.G. the first one would create a line from 1,1 to 2,2. You could make multiple lines per input row also. Whatever you need. For simplicity I just made the output file have an "-out" suffix. This could be somehting prompted for or done more properly later. Lines.mex Lines.txt Lines-out.txt
  17. I sent you links to the Insert and AttEdit commands from the AutoCAD documentation. Did you see that or are you speakgin of somehting else?
  18. You could save the source information as a tab file and edit the tab file in Excel. There's no reason to keep it in the native Excel format unless yo need formulas and such. But even then, MEP can do that math for you. If I wanted to use MEP I'd copy the block properties from the tab file, mentioned above, using ASCII File Process and have MEP create output the command sequence to a text file. Then have MEP run the file as a script, then delete the file for you. Whether it's one or a thousand, it woudl work. The main reason I say that is speed and timing. MEP is unaware of when things finish so you either have to add much delays for each command or handle errors when it goes to fast. By making a script, AutoCAD will do it as fast as possible and you will have no timing issues to deal with.
  19. I covered using MEP as well in my message and made many suggesting including the AutoCAD commands needed. Also, I don't see why you wouldn't use AutoCAD scripts. But, whatever. Do it your own way.
  20. You know.... You could use MEP or any programming language to create the text of a script file then run the script in AutoCAD. That would eliminate all the problems with timing and such. I did this once to create an unsupported solid helical geometry once in AutoCAD. That would make much more sense.
  21. Looking at posts like this, it seems pretty simple to create, insert, and edit attributes of a block in AutoLISP.
  • Create New...