What's new

Alibre Script - script requests

idslk

Alibre Super User
Hello Chris,

That's how it works. That function is something I use (pseudo-plagiarism) from IDSLK (Stefan). It is a Windows thing which I haven't taken the time to research it to see just how it works and what other options of that function may be.
have you thought about using a menu structure like this ?
I think it will solve the things @RocketNut was complaining about...;)

Regards
Stefan
 

RocketNut

Alibre Super User
Hello Chris,
I think it will solve the things @RocketNut was complaining about...;)

Regards
Stefan

I am not complaining at all, just want to give a heads up ONLY. The script works great an have used it a lot in my projects. I love the script it makes my life a hell of a lot easier.

A BIG thanks oldfox for the great script.:):):)
 

GIOV

Alibre Super User
Oldfox, Just said that your Metric Series Screws and nuts's scrip run very well. A window ask for every step to do the correct screw & nuts. Thanks very much for your dedication with idslk collaboration.
 
Last edited:

cncgear

Member
Is there a script that will cost analyse all parts in an assembly and show the total cost for that assembly?

ie..

Locate part
Get cost data, assign to total
Repeat until all parts have been checked
display total.

I know I can cost in BOM but it would be good to have something to show in design whilst working on the design.
Thanks


Col.
 

idslk

Alibre Super User
Hello cncgear,
cost analyse all parts in an assembly
does that mean that the script should analyse a self designed part how much all the needed fabrication steps will cost or only adding costs of catalog parts as screws, bearings or something like this?
Regards
Stefan
 

cncgear

Member
Hello Stefan,

The catalog of parts only, as you write, bearings, screws, bolts, nuts etc.

I store the cost of the item in the 'part data' , 'cost centre' field.
 

idslk

Alibre Super User
Hello cncgear,
I store the cost of the item in the 'part data' , 'cost centre' field.
the part data are under file properties and as far as i know this data could not be pulled via alibrescript.
Regards
Stefan
 

NateLiquidGravity

Alibre Super User
Hello cncgear,

the part data are under file properties and as far as i know this data could not be pulled via alibrescript.
Regards
Stefan
Its undocumented and unsupported but the Alibre API can be used.
Hello Stefan,

The catalog of parts only, as you write, bearings, screws, bolts, nuts etc.

I store the cost of the item in the 'part data' , 'cost centre' field.
https://www.alibreforum.com/forum/index.php?threads/script-release-total-cost-center.21360/
 

idslk

Alibre Super User
hello nate,
nice info...
is the complete alibrex.dll made available unser AS and since when?
regards
stefan
 

NateLiquidGravity

Alibre Super User
hello nate,
nice info...
is the complete alibrex.dll made available unser AS and since when?
regards
stefan
The API Help documentation can be found on the bottom of the Alibre Home window Explore tab. I think the dll has been included in most Alibre releases for addons to use.
Being able to use it like this is a side effect of AlibreScript being based on IronPython.
 

idslk

Alibre Super User
Hello Nate,
is the complete alibrex.dll made available unser AS and since when?
sarcasm mode off...
I think it would have been a thing that should had been announced by The Alibre Team. This is not a thing with has to be "found" by the user community.
I've experimented with this some time ago in my my silent little chamber...

But here something to the script:
Would it be better to change the additions to only "total" to get a correct result for grandtotal?
Code:
            #subtotal = Cost(ThisOcc, total) change to:
            total = Cost(ThisOcc, total)
            print('\n### End SubAssembly: ' + str(ThisOcc.Name))
            total = float(total) #remove: + float(subtotal)
(I've made a testrun with 1 toplevel part and to subassys with 3 parts each and got a wrong grandtotal...)
;)
Regards
Stefan
 

NateLiquidGravity

Alibre Super User
But here something to the script:
Would it be better to change the additions to only "total" to get a correct result for grandtotal?

(I've made a testrun with 1 toplevel part and to subassys with 3 parts each and got a wrong grandtotal...)
;)
Regards
Stefan
Thanks! You are correct I started with code from something else and I was too tired when I uploaded.:oops: I should not have needed to pass the total in the function.
Code:
            #subtotal = Cost(ThisOcc, total) change to:
            subtotal = Cost(ThisOcc)
I will update the script.
 

idslk

Alibre Super User
Hello Mika,
Is the scripts possible to put as "hidden developer option"?
for what purpose? You can save it as a protected script with a self written password function, but if you use the Part Properties to store the cost values you only need to add them manually to get the result (except they are crypted;-)) Do you really have a need for this?
Regards
Stefan
 

Mika

Senior Member
Normal CAD user do not have any needs for the developer tools. Actually many basic mech.engineers like me, getting chicken skin pimples, if need to see any codelines.

It is not off from any of script users usage, if it can be activated from settings. Default it's no need to be visible.
 
Last edited:
Top