Site Logo
Site Logo
 
It is currently Sat Mar 25, 2017 12:41 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: copy level name to workplane as name
PostPosted: Thu Jun 23, 2016 4:43 pm 
Offline
Community Moderator
Community Moderator
User avatar

Joined: Tue Jun 07, 2005 4:51 pm
Posts: 3396
Location: Planet Hulk
what i have

CURRENT_WORKPLANE MODIFY
NAME Bottom
ACCEPT


what i need

CURRENT_WORKPLANE MODIFY
NAME (active level name)
ACCEPT


help please

_________________
Thanks
Bruce Green

never did nothing, try always did
if i have caused you hard feelings it was not intended..but my intent is to get the most from whatever i do. :)
to all that have helped me get to where i am THANKS FOR THE KNOWLEDGE


Top
 Profile  
 
 Post subject: Re: copy level name to workplane as name
PostPosted: Tue Jul 05, 2016 8:12 am 
Offline
Site Admin
User avatar

Joined: Wed Sep 29, 2004 9:44 am
Posts: 2631
Location: Birmingham
This is a little more tricky than it might seem, as there is no direct way to find the current 'active' level. The reason for that is that it is actually possible to have several. You can have lines go onto level 1, surfaces to level 6, or whatever. Although this is possible, though, most people (AFAIK) use just a single input level. The following macro makes that assumption. First it creates a dummy line, and finds out where that goes. From there it gets the level name, and finally sets the name of the active workplane. A little tortuous, I know.....

create line single
0
100
let lname = selection.name[0]
let linlev = line[$lname].level
delete
let levname = level[id $linlev].name
let wpname = workplane.active
clearlist
select add workplane $wpname
modify
name $levname
accept


Top
 Profile  
 
 Post subject: Re: copy level name to workplane as name
PostPosted: Tue Jul 05, 2016 11:59 am 
Offline
Community Moderator
Community Moderator
User avatar

Joined: Tue Jun 07, 2005 4:51 pm
Posts: 3396
Location: Planet Hulk
thanks Jon
i will give it a try

_________________
Thanks
Bruce Green

never did nothing, try always did
if i have caused you hard feelings it was not intended..but my intent is to get the most from whatever i do. :)
to all that have helped me get to where i am THANKS FOR THE KNOWLEDGE


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