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:

Values and Parameters


Recommended Posts

Hello again,

 

Is there any way to get, or set values or parameters on forms using script?

 

For example, If I wanted to create LETTERS using VBScript, could I select a font, or alignment with script?

 

Could I set or read other parameters such as radius value, top or bottom?

 

Another example would be the text string of a note or lable.

 

All responses are most welcome.

 

Regards,

Steven

Link to comment
Share on other sites

Hello again,

 

I would like to ask a more direct question.

I use the "bret = RunMastercamCommand ("create_letters")" in my VBScript and it works properly.

 

I wish to pass the string of letters, and the letter size to the function. How can I do this?

Can I set some sort of system value? do I pass parameters in some way?

 

All help is VERY much appreciated.

 

Regards,

Steven

Link to comment
Share on other sites
  • 3 weeks later...

Hello all,

 

I have recently downloaded and installed "X4".

I have read thruough the VB documentation I found in help files.

 

How can I create a class that will display the attributes of DRAFTING NOTES? For example, If I were to select a note, how could I pass the text of the note into a VB variable?

 

Am I wishing for something that is impossible?

 

I have asked my tech support group for help, but have not yet received much help.

 

ANY information on passing parameters to mastercam calls would be VERY much appreciated.

 

Regards,

Steven

Link to comment
Share on other sites

Takashi,

 

I wish to thank you very much for responding to my request. I have been waiting for over a month for my tech support group.

 

I have been looking through some of the files, and I see some things that are a bit unclear.

 

For example, I see in your "CHOOKS X4 BETA" file, you have created some file tables. Where do you get the values for the tables, and what do the values represent?

 

Also, how do you recommend that I place your "vbo.zip" files so that I can see them work?

I am still a bit unfamiliar with VB with Mastercam.

 

Best regards,

Steven

Link to comment
Share on other sites

Steven,

I dont know which files you are seeing,

and I believe they are config file or history file.

 

quote:

Also, how do you recommend that I place your "vbo.zip" files so that I can see them work?

I am still a bit unfamiliar with VB with Mastercam.

extract vbo.zip to chooks folder,

then run mastercam and run vbscript from mastercam.

 

vbo.dll is a activex dll, and it has a function named "DrawString".

but you cant use it by alt+c, it does not have m_main chook function.

code:

 

Dim vbo

Set vbo = CreateObject("VBObject")

'DrawString(X, Y, Z, View, Height, Color, String)

vbo.DrawString 0.0,0.0,0.0,1,10.0,10,"wwwww"

vbo.DrawString 0.0,10.0,0.0,1,15.0,11,"wwwww"

vbo.DrawString 0.0,25.0,0.0,1,30.0,12,"wwwww"

Set vbo = Nothing


So you need dlls which extends the ability of vbscript.

Link to comment
Share on other sites

Takashi,

 

I did as you suggested and the file did not execute.

 

I received an error:

 

"Microsoft VBScript runtime error

ActiveX component can't create object: 'VBObject'

IActiveScriptSite::OnSctiptError()

Line:"

 

Do I need to install and register some ".ocx" file or something like that?

 

Best regards,

Steven

Link to comment
Share on other sites

Takashi,

 

I will try again at work tomorrow. Perhaps I needed to power down and reboot for everything to register properly.

 

I have used VB for several years with another machining package. It required an ".ocx" file to interface.

 

Do you have any recommendations for documentation for using VB with mastercam? I am quite sure that once I get started, I should progress pretty quickly.

 

Thank you again for your time and your efforts.

 

regards,

Steven

Link to comment
Share on other sites

I also attached source code(c++).

http://ai-sols.sytes.net/dev/vbo.zip

 

quote:

Do you have any recommendations for documentation for using VB

I have files below only..

c:mcamxhelpVBScript.htm

c:mcamxvb*.vbs

ftp://www.mastercam-cadcam.com/Mastercam_forum/VB_Scripts/

http://www.google.com/search?q=VBScript

 

and this is for nethook. (VB .net /C#)

http://www.emastercam.com/cgi-bin/ultimate...c;f=13;t=000386

Link to comment
Share on other sites
  • 2 months later...

Takashi,

 

I have tried many times to get the project to run. I have not been successful.

 

I read through the files, trying to determine what the project does. It seems to me that the project creates a note at three different locations. Is this correct?

 

My original goal was to select a note that had been previously created and to return the contents of that note as a string variable. Is there any more information you can share?

 

best regards,

Steven

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...