Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I have the following line of code in a Python script:
#PartQuantity = "{}".format(len(design.rootComponent.allOccurrencesByComponent(component)))
At present, the output of a number, in this case the quantity in an assembly, is....
1---
12--
123-
1234
I need the numbers formatting so that the output is....
---1
--12
-123
1234
(The character "-" represents a space, I do not need this character in the output)
Can anybody update the line of code to allow me to do this?
Many thanks in advance!
Darren
Solved! Go to Solution.