Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros 2

Status
Not open for further replies.

Enginerd9

Mechanical
Jan 11, 2008
149
0
0
US
Anyone know if you can write macros in ST6?

I want to be able to create a PDF from a draft by collecting embedded properties, appending them to a file name, then dropping it into a known file location. For example: my draft is called [Part Number as File Name].dft. I want to save the PDF to be [Part Number as File Name]-[%Revision|G]-[%Description|G].pdf, saved to C:/Some Folder Name Which Is Relevant.

Once this is done, I want to assign that macro to a user button so I can execute it with every draft.

If I can get that working, I can export to DXF, DWG, and maybe STEP as well in the same file naming convention.

Thanks!
 
Replies continue below

Recommended for you

Solid Edge doesn't allow you to record macros, but if you know VB, C+, or other programming languages you can write your own code and assign it an icon within Solid Edge to run as a macro.

--Scott
www.wertel.pro
 
Hi All

I was just wondering if Enginerd9 or anybody else has made any progress in creating a macro to create pdfs from Solid Edge?

Thanks in advance

 
I was working on that, but of course other project demands got in the way. I'll see if I can figure something out in the next week or so; if I do, I'll certainly share the work.

Thanks!

Experience: accumulated knowledge over time.

Talent: the ability to use experience.

Which is more valuable?
 
Turns out there's a few notes in the Help > Programming with SolidEdge repository. There's a few examples of code to save in various formats, etc.

I've had to work on this at home in my "spare time" because I don't have access to Visual Studio at work. It's still in the works though... I'll keep you posted.

Experience: accumulated knowledge over time.

Talent: the ability to use experience.

Which is more valuable?
 
Thanks for the info. I've just had a quick look and as I have no programming experience it has put me off even trying.

Good luck with your efforts and I'd love to hear how you get on...
 
If you look in the c:\Program Files\Solid Edge [Version]\Custom\Batch folder there is a VB.net project in there that you could adapt to do everything you need.
As it happens I'm doing the same thing at work, but unfortunately haven't got time to finish it at the moment - maybe in a few weeks time.

My advise is don't give up - I think this is a good starting point for learning to create your own macros. Chapter 10 of the .Net Programmers Guide for Solid Edge (I think you can get that through Solid Edge Help) relates to file properties.

bc.
Core i5-3570 @3.4GHz , 8GB RAM
Quadro FX4600. W7 Pro 64-bit.
 
Thanks beachcomber

I found the batch.vbproj file but am unableto open it :(
Do you know of any free software that would be able to open and edit it?

Thanks in advance
 
The Visual Basic link above is a good place to start. You can get a free demo good for X days downloaded right from that link. You have to register and all that before hand though. This is primarily why I'm taking so long on this, trying to get my IT guy to grant me a temporary seat rather than messing with the demo at home.

Experience: accumulated knowledge over time.

Talent: the ability to use experience.

Which is more valuable?
 
Just thought I'd point out that the free downloads from Microsoft for VB.net 2010 are fully functioning versions with no time limit.
They are not just demo versions.

bc.
Core i5-3570 @3.4GHz , 8GB RAM
Quadro FX4600. W7 Pro 64-bit.
 
Status
Not open for further replies.
Back
Top