Site Logo
Site Logo
 
It is currently Sun Apr 02, 2017 10:16 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: how to turn on dialogs
PostPosted: Tue Mar 03, 2015 6:02 pm 
Offline
New User
New User

Joined: Fri Jan 28, 2011 8:27 pm
Posts: 6
how can i use the automation class to turn on and off dialogs in powershape?


Top
 Profile  
 
 Post subject: Re: how to turn on dialogs
PostPosted: Tue Mar 03, 2015 6:43 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Hi jrannou. You should be able to use the functions:

DialogsOn()
DialogsOff()

on the PSAutomation object to do this. There is more information on these in the samples on the page where you downloaded Custom Software Core from.

You may also find these useful:
FormUpdateOn()
FormUpdateOff()


Top
 Profile  
 
 Post subject: Re: how to turn on dialogs
PostPosted: Tue Mar 03, 2015 8:33 pm 
Offline
New User
New User

Joined: Fri Jan 28, 2011 8:27 pm
Posts: 6
thanks, that's what i thought but i get an error:


Error 1 Reference to a non-shared member requires an object reference.


thansk

john


Top
 Profile  
 
 Post subject: Re: how to turn on dialogs
PostPosted: Tue Mar 03, 2015 8:57 pm 
Offline
New User
New User

Joined: Fri Jan 28, 2011 8:27 pm
Posts: 6
i got it, i forgot to:
Dim PowerSHAPE As New PSAutomation(Delcam.ProductInterface.InstanceReuse.UseExistingInstance)
Dim psModel As PSModel = powerSHAPE.ActiveModel


Top
 Profile  
 
 Post subject: Re: how to turn on dialogs
PostPosted: Thu Apr 02, 2015 5:57 am 
Offline
New User
New User

Joined: Mon Dec 31, 2012 10:36 am
Posts: 8
I have tried this Cylinder example with creation of Winodws form. Now user can supply parameters to create cylinder with given parameters in the text box.
It is attached here.

Before running the program, please open PowerSHAPE instance.

Regards,
xdpbp


Attachments:
CylinderExample.zip [323.83 KiB]
Downloaded 25 times
Top
 Profile  
 
 Post subject: Re: how to turn on dialogs
PostPosted: Tue Apr 07, 2015 11:47 am 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Hi xdpbp

Thanks for your input - great to see you using Custom Software Core.

I just wanted to give you some feedback on your code that may help you in the future:

1. There is a function for creating a cylinder solid already:
psModel.Solids.CreateCylinder(originPoint, cylinder_radius, cylinder_height)

2. You only need to call psModel.Refresh() if you create an item using powershape.Execute() functionality. If you create objects using the standard functions you do not need to call this function.

Happy coding!
Luke


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB