Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Post does not allow to correctly launch external editor


Recommended Posts

Hello.

 

I am trying to launch several NC files in external editor in ppost$ block and I have one little problem. Here is how my code looks:

 

code:

seditor "C:McamX3commoneditorsCIMCOEdit5CIMCOEdit.exe"

s_iteral

s_main_spindle

s_sub_spindle

s_nc_files

 

ppost$

 

s_main_spindle = spathnc$ + snamenc$ + sextnc$

s_sub_spindle = spathnc$ + snamesub$ + sextnc$

 

s_iteral = no2asc(34)

 

s_nc_files = s_iteral + s_main_spindle + s_iteral + " " + s_iteral + s_sub_spindle + s_iteral

 

result = launch(seditor, s_nc_files)

Both files are getting opened in the Cimco Edit, but the problem is that the posting does not finish after launching EXE file. Mastercam just waits there until I CLOSE the editor and only then it finishes with posting. I don't want to close the editor - I want to leave it open.

 

Is there any solution to this?

Link to comment
Share on other sites

The easiest method to launch multiple files in an editor is to add them to the list by using the setncstr function.

 

You should be able to modify this code to work:

 

code:

      sfile = spathnc$ + snamenc$ + sextnc$  #Set file path 

result = setncstr(2, sfile) #Add to edit list so file will open in editor

#2 indicates add, 3 indicates remove from list

Update sfile for each file you wish to add (don't forget to initialize any user defined variable you may use, including sfile).

Link to comment
Share on other sites

Hello,

 

I just tried this function but the result is still not the way I would like.

 

This is the code:

 

code:

       

sit = no2asc(34)

sfile = sit + spathnc$ + snamenc$ + sextnc$+ sit + " " + sit + spathnc$ + snamesub$ + sextnc$ + sit #Set file path

result = setncstr(2, sfile)

Mastercam opens both files in the editor and stays "locked" until I manualy close the Cimco editor. After that I can use Mastercam again.

 

Is this the way this should work?

 

I would like the editor would stay open and Mastercam "unlocked".

 

Best Regards

 

Gorazd

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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

×
×
  • Create New...