Changing Duct Length via a Script

Changing Duct Length via a Script

Jacob_United
Advocate Advocate
702 Views
3 Replies
Message 1 of 4

Changing Duct Length via a Script

Jacob_United
Advocate
Advocate

Hi all,

 

I need to add 5mm to the length of insulation developments for our decoiled ductwork to allow for variation in the width of the coils.

 

At first I thought I could do this by simply copying the connector, adding the 'Insulation End Override' and making a script to swap out the connector. This was a no go as the insulation is processed as 'Four Parts', independent of what the 'Straight Type' is. It appears the 'Insulation End Override' only applies if the insulation parts are set to 'Same'.

 

So I then just decided to make a script to increase the length of the duct to increase the insulation length by the same amount. The length of the decoiled duct is pretty irrelevant as they are made at a standard length and we do not use it in any reports or calculations. The problem is that I can't seem to override the length with a script. I've tried various different methods but to no avail; is this possible? The basic script I'm using is below:

 

rem Function: Change length.

 

function changelength()
if item.length = 1400 then
item.length = 1405

item.update()
endif
endfunction

 

rem Select: Change length.

 

select item.description
case "RCT. STRAIGHT"
changelength()
endselect

 

I've tried using: item.dim[3]dim length = item.length, and putting quotation marks around the value ("1405").

 

None of that worked, so I am now thinking that this approach is also a no go.

 

Can anyone suggest a solution to the above method or provide a new method entirely for achieving this? I would much prefer to not mess around with my specifications if at all possible.

 

Regards,

 

Luke Evans

 

 

If my post answers your question, please click... Just kidding!
0 Likes
703 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

item.update() is forcing your duct to look back at the Specification which then is likely resetting the duct length back to it's intended size.

 

I would not recommend the approach you're taking for resolving your issue.

 

Have you looked at the Insulation settings in Pattern Options?

0 Likes
Message 3 of 4

Jacob_United
Advocate
Advocate

Thanks for the reply Darren,

 

I have tried running the script with and without "item.update()", it doesn't work either way. It seems there is an issue with writing data to length.

 

The insulation settings are set up for our whole database, whereas I just need to add length to one type of fitting. The connector level override would normally do the job. However, there is evidently an issue when setting insulation to four parts (which we need to do to CNC cut the insulation). There is no issue when setting the insulation parts to same.

 

For the moment I have asked the workshop to change the lengths manually. Will post back here if I find a solution.

 

Maybe I should just tell the workshop to tighten up their tolerances!

If my post answers your question, please click... Just kidding!
0 Likes
Message 4 of 4

Anonymous
Not applicable
If you post or email me a small DWG or MAJ with instructions on which settings you want changed, I’ll take a look toward the end of the week.
0 Likes