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

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Active level in toolbar
PostPosted: Sun Jan 03, 2016 7:58 am 
Offline
DELCAM User
DELCAM User

Joined: Wed Jan 15, 2014 8:37 pm
Posts: 29
¿as I can rescue the level number that is in the toolbar?

download/file.php?mode=view&id=6351

with .ACTIVE and .USED don't work.


Attachments:
Sin título.jpg
Sin título.jpg [ 188.74 KiB | Viewed 78 times ]
Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Mon Jan 04, 2016 1:32 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Thanks for your post. Apologies, I am not sure what you are asking. If you need access to the level 4 then something like the following will give you that:
Code:
var level4 = powerSHAPE.ActiveModel.Levels[4];


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Mon Jan 04, 2016 7:19 pm 
Offline
DELCAM User
DELCAM User

Joined: Wed Jan 15, 2014 8:37 pm
Posts: 29
I need the level select in level selector...


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Mon Jan 04, 2016 10:35 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
If you want to set the active level then you can do this by:
Code:
powerSHAPE.ActiveModel.Levels[4].IsActive = true;


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Tue Jan 05, 2016 6:24 am 
Offline
DELCAM User
DELCAM User

Joined: Wed Jan 15, 2014 8:37 pm
Posts: 29
ok, there is no property that returns that particular level, would have to do a cycle through the entire collection level and get what the active level. Thank you very much, certainly solved.

Something like this with linq:
Code:
var Level = powerSHAPE.ActiveModel.Levels.ToList().Find(x => x.IsActive.Equals(true));


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Tue Jan 05, 2016 1:57 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
I understand what you need. You wish to set the creation level.
Currently you can set it via the command:
Code:
powerSHAPE.ActiveModel.SetCreationLevel(powerSHAPE.ActiveModel.Levels[4]);

There is currently no way to read the creation level. You could possibly determine it with something like:
Code:
var point = powerSHAPE.ActiveModel.Points.CreatePoint(new Delcam.Geometry.Point());
var creationLevel = point.Level;


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Wed Jan 06, 2016 8:17 am 
Offline
DELCAM User
DELCAM User

Joined: Wed Jan 15, 2014 8:37 pm
Posts: 29
thanks, sorry for my english, i'm spanish... and google traduct is my friend.... :D


Top
 Profile  
 
 Post subject: Re: Active level in toolbar
PostPosted: Wed Jan 06, 2016 10:17 am 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
No problem, happy to help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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:  
cron
Powered by phpBB