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:

VBscript DeleteEnity()


Recommended Posts

Hi,

I'm currently working on SP1 10.0.14.19 version.

Is the vbscript DeleteEntity() function working properly?

 

When I create a Line and delete it, the line doesn't get deleted. Also, Mastercam "screen statistics" function gives incorrect number of entities after running the following code:

 

intNewLineVectorPtr = CreateLine(objNewLineVector, mcCONSTRUCTION_COLOR_CURRENT, mcCONSTRUCTION_LEVEL_CURRENT)

 

DeleteEntity(intNewLineVectorPtr)

 

Please let me know.

Thanks!

Link to comment
Share on other sites

Thanks Mick.

 

I'm finding now that the line does get deleted, but the image still remains on the graphics screen. Repaint and Clear screen functions doesn't quite clean up that line. Also, at this point the "Screen statistics" gives incorrect info. But when I change to a different level and switch back to the original one, the line gets erased and screen statistics icon works fine.

 

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

Sub Main()

 

Dim objLineVector

Dim intLineVectorPtr

 

Set objLineVector = New McLn

With objLineVector

 

.X1 = 0

.Y1 = 0

.Z1 = 0

 

.X2 = 0

.Y2 = 0

.Z2 = 1

 

End With

 

 

intLineVectorPtr = CreateLine(objLineVector, mcCONSTRUCTION_COLOR_CURRENT, mcCONSTRUCTION_LEVEL_CURRENT)

 

SetCPlaneNumber(0) ' Set CPlane = 3D to work in coordinate system's 3D space

 

' -- Clean up

DeleteEntity(intLineVectorPtr)

 

End Sub

_________________________________________

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