Python Forum
Can I make this program on Python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I make this program on Python?
#1
Hey,

I'm learning Python, and i want to know if is possible to make a program, using Python, that interacts with other programs, like SolidEdge for example.

Just to give some context, I'm a Mechanical Engineer and in my company we take to much time doing some repetitive tasks. One of them is transforming 3d parts in 2d with DXF format.
This is time consuming because sometimes we have to do this process to 40/50/100 parts and we end up spending one day in this.

My question is, is it possible to do a program with Python that receives all 3d parts I want and then, the program open SolidEdge and do the process to transform the parts into DXF format one by one?

Is it hard for a beginner like me?

Thank you all,
From Portugal
Reply
#2
What is the file extension of those 3D parts?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
Yes, you can do it. SolidEdge has no native support for Python, it uses .NET. You can use IronPython in .NET to solve your task.
Maybe doing your task direct in C# is easier.

Here is one source: https://github.com/Rlee13/IronPythonExamplesForSE

One more question you should ask: Can you do the conversion outside of SolidEdge.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#4
I don't know if I can do the conversion outside of SolidEdge. I know what the program should do, but i don't know the path i need to make, neither the easiest one.

I barely know how to program in Python, for now I don't want to try C#.
I'm trying to use this to learn how to program, but i'm afraid this is too much.

Any help where should I start? I'm only familiar with excel macros, where I recorded the task and then use it, sometimes I tweaked the code but nothing more than that.
I was thinking in using the same approach with SolidEdge. Programing a script to make the same steps for all parts.
Reply
#5
Quote:One of them is transforming 3d parts in 2d with DXF format.

What is the source format of the files? Are there any special parameters which need to be applied before the conversation? I think this programs have things like origin, orientation, layers, etc.

Sometimes you can do also a conversion via command line. Do you have SolidEdgeTranslationServices.exe? Can you use this for your task?

If yes, the rest is very easy. Scanning a directory for files and execute a program is not rocket science.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#6
It would be good to convert the files without using SolidEdge. It's not clear yet what are those 3D files.
You can automate this easy but it will be ugly and not so efficient. I am using PyAutoGUI for two of my own automation scripts.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#7
there are number of python packages that work with dxf files. Some months ago (around Feb 2017) there was user working with dxf files and at that time I had a look at dxfgrabber package in order to help him. There are others packages too:
https://pypi.python.org/pypi?%3Aaction=search&term=dxf

What is the input format? dxf?
Reply
#8
The 3d files are in ".part" format. Is the normal format for Solid Edge.
The thing with this is you can't just save the part with DXF format, as you do with word 2010 to PDF for example.
You need to do a list of steps in SolidEdge, such as converting to sheet metal (and for that you need to select faces and edges)

Quote:Do you have SolidEdgeTranslationServices.exe?
What is this?
Reply
#9
https://community.plm.automation.siemens...a-p/319618
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to make a program recognize how many clicks it has had on the monitor? jao 0 1,152 Feb-25-2022, 06:31 PM
Last Post: jao
  How to make a Vocal synthesizer program on Python? Seadust 3 3,547 Jan-28-2021, 06:26 PM
Last Post: gonnach
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 2,307 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
  I try to make Heron formula program abcd 7 3,387 Oct-22-2020, 12:48 AM
Last Post: abcd
  Make a Python program executable in Windows Pedroski55 1 2,100 Sep-26-2020, 12:34 AM
Last Post: bowlofred
  I code a program to solve puzzle but i can't make it more dynamic. Shahmadhur13 5 2,729 Apr-18-2020, 10:05 AM
Last Post: Shahmadhur13
  how to make a program with a certain number of multiples? syafiq14 3 2,756 Jan-01-2020, 02:39 PM
Last Post: syafiq14
  How to make a program run "online"? DanielTkach 2 2,533 Apr-09-2019, 11:59 PM
Last Post: DanielTkach
  Python Program to Make a Simple Calculator jack_sparrow007 2 10,161 Oct-19-2018, 08:32 AM
Last Post: volcano63
  Can Python make a large program with lots of gigabytes? OnisionTheOninonBoy 15 12,272 Dec-19-2016, 08:49 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020