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

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Solid Parameters
PostPosted: Fri Nov 20, 2015 10:14 am 
Offline
DELCAM User
DELCAM User

Joined: Thu Jun 30, 2011 9:44 am
Posts: 21
Hello,
I want to use the 'parameter' for solids.
If I build each solid using this function, for exermple:
Solid # 1
Width = parameter # 1.
Length = parameter # 2.
Height = parameter # 3.
Solid # 2
Width = parameter # 1.
Length = parameter # 2.
Height = parameter # 3.
etc ...
If I make several copy / paste my solid # 1, pasted solid name will be solid # 1_1, solid # 1_2 solid # 1_3 ...

But the parameters are also duplicated.

Solid # 1
Width = parameter # 1.
Length = parameter # 2.
Height = parameter # 3.
Solid # 1_1
Width = parameter # 1_2.
Length = parameter # 2_2.
Height = parameter # 3_2.


Is there a possibility (perhaps a macro) to rename the parameters in solids in order to use the parameters ' arameter # 1, 2 and 3 ' instead of ' parameter # 1_1, # 2_1, # 3_1, # 1_2, # 2_2,# 3_2 ... '

Thanks for your help

Regards,
Laurent


Top
 Profile  
 
 Post subject: Re: Solid Parameters
PostPosted: Fri Nov 20, 2015 10:49 am 
Offline
Site Admin
User avatar

Joined: Wed Sep 22, 2004 1:36 pm
Posts: 625
Location: Birmingham, UK
You code do something like this:-

Code:
// the parameter values
let l_num = 60
let w_num = 70
let h_num = 80

// commands to create the parameters
object parameter
CREATE
Select l_block
EXPRESSION $l_num
APPLY
CREATE
Select w_block
EXPRESSION $w_num
APPLY
CREATE
Select h_block
EXPRESSION $h_num
APPLY
ACCEPT

// set variables for the creation position
let posx = 0
let posy = 0
let posz = 0

// set the number of solids to be created
let num_blocks = 5

LET i = 1
LET carry_on = ($i <= $num_blocks)
WHILE $carry_on {

  // create a solid block
  CREATE SOLID
  BLOCK
  $posx $posy $posz
  MODIFY
  LENGTH CALCULATOR
  PARAMETERS
  DISPLAY  l_block
  INSERT PARAMETER
  ACCEPT
  WIDTH CALCULATOR
  DISPLAY  w_block
  INSERT PARAMETER
  ACCEPT
  HEIGHT CALCULATOR
  DISPLAY  h_block
  INSERT PARAMETER
  ACCEPT
  ACCEPT
  Select
 
  // create the blocks at different positions
  let posx = $posx + 100
  // let posy = $posy + 100
  // let posz = $posz + 100
  LET i = $i + 1
  LET carry_on = ($i <= $num_blocks)

}

select clearlist


Top
 Profile  
 
 Post subject: Re: Solid Parameters
PostPosted: Fri Nov 20, 2015 2:12 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Jun 30, 2011 9:44 am
Posts: 21
Thank you, Claire.

:D


Top
 Profile  
 
 Post subject: Re: Solid Parameters
PostPosted: Fri Nov 20, 2015 2:12 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Jun 30, 2011 9:44 am
Posts: 21
Thank you, Claire.

:D


Top
 Profile  
 
 Post subject: Re: Solid Parameters
PostPosted: Fri Nov 20, 2015 2:12 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Jun 30, 2011 9:44 am
Posts: 21
Thank you, Claire.

:D


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


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