Jump to content
Developer Wiki and Function Reference Links ×

close database headers


Recommended Posts

I'm trying to write a very very simple script that is eluding me.

I'd like a script that closes the db headers of all worksheets in a drawing.

I thought it would be super simple. Something like:

Procedure CloseAllHeaders;

Procedure CloseThatHeader (CurrentWorkSheet :HANDLE);

Begin

SetObjectVariableBoolean(CurrentWorkSheet,82,FALSE);

END;

Begin

ForEachObject(CloseThatHeader, (((T=WORKSHEET))));

End;

RUN(CloseAllHeaders);

I have tried:

Declaring the variable in the main procedure

Opening the worksheet - EditObjectSpecial(CurrentWorkSheet,0);

Almost every procedure/function that looks promising in the worksheet section....

T=56

T=SPREADSHEET

I'm assuming that since the script will open all the worksheets that I'm really getting the handles to each. But why won't it edit?

I find it puzzling that, with an open worksheet, this works perfectly:

Procedure ToggleDBHeader;

VAR

WSHand : Handle;

BEGIN

WSHand:=GetTopVisibleWS;

SetObjectVariableBoolean(WSHand,82,NOT GetObjectVariableBoolean(WSHand,82));

END;

RUN(ToggleDBHeader);

Once again I come here to ask: "What am I doing wrong?"

Thanks!

MK

Link to comment
I'm trying to write a very very simple script that is eluding me.
Maybe it's not that simple?

Glib remarks aside, I believe you are working with the shadow and not the object causing the shadow. T=56 is the image of a Worksheet placed in the drawing. It is like a symbol instance compared to a Symbol Definition. T=18 is the actual Worksheet.

I haven't vetted any of your subsequent thinking, so this isn't a complete answer, but I'd try working with the actual Worksheet "definition".

HTH,

Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...