Zaffin_D

Verified Members
  • Content count

    345
  • Joined

  • Last visited

Community Reputation

205 Excellent

4 Followers

About Zaffin_D

  • Rank
    Advanced Member

Recent Profile Visitors

1,432 profile views
  1. Just so you are aware, this is not an ideal use for opinfo. When you tell opinfo to query an NCI line it searches the NCI file that’s on disc. I’m almost positive you can get the value you are looking from a traditional parameter in memory, have you done a parameter dump? Using opinfo on an NCI line should only be done if the data isn’t available in memory.
  2. That’s an interesting idea, but I’m not hot on it. Are you going to implement it?
  3. Thanks! Multiple instances was the driving force behind this add-in, as everything else can be done in Mastercam OOTB. I didn't like programing HMC's TOP-FRONT and wanted a quick way to create any number of views from an existing view and one of it's axes. I actually went a bit crazy the past few evenings reworking the UI to reduce clicks and adding a view name template so the resulting views' names can be customized.
  4. I did something similar awhile back, very cool!
  5. Zaffin_D

    Swarf Machining stuttering on C-axis

    I'd expect the motion on the inside corners to be erratic. Start at the lower right of the below image; notice how the flags (dark purple) are nicely flowing? Once we hit the corner, big swings start to happen. This could be avoided by fixturing the part at an angle, or by smoothing the instability across multiple moves. The result of the latter is shown below.
  6. Zaffin_D

    Function arguments

    I'm not familiar with scandic characters, so I grabbed some random non-ascii ones for this example. s_return : "" s_replacement_char : "" flktbl 1 4 "A" "Ä" "E" "Ë" "I" "Ï" "O" "Ö" s_string : "STRÏNG ÖF MÏXËD CHÄRÄCTERS" p_sanitize_s_string s_return = regex("([^\x00-\x7F])", s_string, 0) while strlen(s_return), [ s_replacement_char = flook(1, s_return) s_string = regex(s_return, s_replacement_char, 2) s_return = regex("([^\x00-\x7F])", s_string, 0) ] psof$ "BEFORE: ", s_string, e$ p_sanitize_s_string *e$ "AFTER: ", s_string, e$ Sample output BEFORE: STRÏNG ÖF MÏXËD CHÄRÄCTERS AFTER: STRING OF MIXED CHARACTERS You would have to add all the replacement characters to the look up table, and if the replacements are outside the ascii range the regex would need to be modified; but you get the idea.
  7. Zaffin_D

    Function arguments

    I've tried this both managed and native add-ins. The result is the same; MP takes time to spool up the process. Also because of the serial nature of MP, nothing is happing until the called app returns. It's not a big deal if you are doing it a handful of times, but it can get bothersome. In this case (parsing a string) MP's regex function would be very useful and much quicker than sending it out to an external app. Not to derail this, but I think you should look into what inline-ing does.
  8. Zaffin_D

    Function arguments

    That would work, but in my testing repeatedly using the launch or dll function will make the posting time much longer. The dll function will allow you to pass three arguments between an add-in and the post; no need to write anything to disk in most cases.
  9. Zaffin_D

    Function arguments

    You are out luck on both counts. Strings can’t be passed as arguments. MP post blocks can only operate on arguments; they cannot truly return a value.
  10. Zaffin_D

    Anyone Setup a NC Configuration for Code Expert?

    Code expert’s highlighting is file dependent; nc files highlight differently than post files. The $ sign is not a problem, a proper regular expression needs to be used to identify the sync points.
  11. Zaffin_D

    Anyone Setup a NC Configuration for Code Expert?

    A $ in a regular expression asserts the end of a line, so that’s not going to work. Escape the $ with a \. I highly suggest you use a site like regex101.com to help you if you are new to regular expressions.
  12. Not exactly. The CycleTime add-in was created as a simple way to get a variety of cycle time information during posting. The times it provides are not more accurate.
  13. Zaffin_D

    2021 5 axis helix bore

    For that to be true the post would have to be configured to build the helical arcs from the linear data. The NCI only contains linear moves with the axis control set to 4 or 5-axis.
  14. Zaffin_D

    ThreadC.dll

    The ‘C’ in threadC means contour, so using it with a single entity is not really it’s intended use. Your reseller is correct, a custom post is required; I’m not aware of any CNC post that supports threadC. This is because threadC writes it’s parameters to the NCI and doesn’t fill out the normal threading NCI lines.
  15. Zaffin_D

    tool comment

    If you are using Mastercam 2019 or later, use a regular expression to sanitize the string. s_regex := "[^\x00-\x7F]" s_replacement := "" psof$ *e$ "Before: ", ~strtool$, e$ strtool$ = regex(s_regex, s_replacement, 2) "After : ", ~strtool$, e$ Sample output. Before: Ø12 R0,2 *60 ISCAR After : 12 R0,2 *60 ISCAR

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us