We are looking for a Solid Edge macro that can show or hide a check-print stamp on a drawing. Does anybody know if one exists? Essentially something that can turn layers on and off. Just so that we can use a button instead of doing that manually.
At present, we use separate title blocks that contain the check-print stamps but wish to simplify things.
this is something I have done a couple of years ago.
You will find my SE_Layer macro under
There are 3 files, the EXE, a BMPand an INI file.
Within the ini file there is an entry for 5 layer names
1 = first layer name
2 = second layer name
and so on
If thes layers exist, the names will be shown in the form giving You the opportunit to show or hide this layer.
Layers one and two are special.
If You turn OFF layer one then layer two will also be hidden.
Turning ON two will turn on one also.
This was a customers request.
hope it helps
PS.: You will find a couple of more - also free - macros for Solid Edge on my homepage
http://www.cadcam-consult.com and then go to Solid Edge and find the free tools
PS.: at the moment, some off them are german only.
But if necessary I can translate them into english too.
PS2.: I have seen, that I can attache the files here directly!
Yeah, I kind of enjoy writing small macros here-and-there that would be of general nature and of help to everyone in the community, but this seems to be a specific requirement for your customer.
I tried executing the attached SELayer with a Draft document open and ended up with just this:
Though coding for the requirement described would be a piece of cake, I'd suggest you take it up in the DEV forum.
That macro works quite well, and will be a start.
Have you thought of using property text for this purpose? you could have a property that says "Check Drawing" and then have that as property text on the Draft. You could have an EXE that twiddles the "check drawing property". Might be handy because you could inquire the state of the property without having to even open/look in the file.
Just a thought...
property text is one of ma favorites.
And IMHO there is no need for an extra property, just use the staus text property to show the current state of the status.
In work, released and so on.
The only issue is, that there always will be a status watermark in the background.
Using properties can let them blank too.
Attached is a variation of the macro that I tried to make as general as possible, though i am not sure who else might want to use such functionality:
1. Place the MacroName.ini file in the same folder as the MacroName.exe
i.e SELayer.ini should be in the same folder as SELayer.exe
This allows changing the name of the executable, so long as the ini file name is also renamed accordingly.
2. If the ini file is not found, the maro prompts to pick one - this time around the name of ini file could be different from the executable name.
[ bit ashamed of my folder structure naming ]
3. Layers are listed as plain names, one on each line, as below:
[Unable to handle special characters like the A with two dots on top in Anderungstabelle]
4. The only functionality not covered from your original routine is automatic selection of Layers 1 and 2.
For this, just pick both layers using Shift, Ctrl or Dragging in the Listbox.
Hope you find this useful.
Thanks for having a look at this. I loaded the macro and set it up as you described. I edited the ini file to list the layers I am interested in controlling. Unfortunately when I run the macro with the dft file open, no layers appear in the macro's dialog box.