Macro for showing and hiding check-print stamp on title block?

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

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.

13 REPLIES

Re: Macro for showing and hiding check-print stamp on title block?

Esteemed Contributor
Esteemed Contributor

Hi there Chris,

 

The alternate background sheet, is the method I use to deal with this also.....with any luck the "code-wizard" @Tushar will pick this up, and have something like what you need.

Sean Cresswell
Design Manager Streetscape Limited
Solid Edge ST10 [MP0] Classic [x2 seats]
Windows 10

Re: Macro for showing and hiding check-print stamp on title block?

Phenom
Phenom

Hi,


this is something I have done a couple of years ago.

 

You will find my SE_Layer macro under

http://www.cadcam-consult.com/Files/Solid_Edge/SE_Layer.zip

 

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

regards

Wolfgang

 

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!

 



regards
Wolfgang

Re: Macro for showing and hiding check-print stamp on title block?

Phenom
Phenom

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:

Untitled.png

Though coding for the requirement described would be a piece of cake, I'd suggest you take it up in the DEV forum.

 

Regards,

Re: Macro for showing and hiding check-print stamp on title block?

Phenom
Phenom
Hi Tushar,


just follow the steps before.

You have to define the 5 layers in the INI.

If you do not so, there will be 5 examples in german, which willmnot be available in Your draft.
Changevthat and You will see them in the form.

Therevare onlylayers visible which arendefined in the ini and which exists in the draft.

regards Wolfgang



regards
Wolfgang

Re: Macro for showing and hiding check-print stamp on title block?

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Hi Wolfgang,

 

That macro works quite well, and will be a start.

 

 

 

 

 

Cheers,

 

Chris

Re: Macro for showing and hiding check-print stamp on title block?

Community Manager Community Manager
Community Manager

Chris,

 

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...

Dan Staples
Director, Solid Edge Product Development

Re: Macro for showing and hiding check-print stamp on title block?

Phenom
Phenom

Hi Dan,


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.

 

regards

Wolfgang

 



regards
Wolfgang

Re: Macro for showing and hiding check-print stamp on title block?

Phenom
Phenom

Hi Wolfgang,

 

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.

 

1.png

[ bit ashamed of my folder structure naming Smiley Wink ]

 

3. Layers are listed as plain names, one on each line, as below:

2.png

 

[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.

 

Regards,

Tushar Suradkar

 

Re: Macro for showing and hiding check-print stamp on title block?

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Hi Tushar,

 

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.

 

 

Cheers,

 

Chris