Jump to content
Developer Wiki and Function Reference Links ×

Setting PIO class


ionw

Recommended Posts

Good Day,

It seems like this question should have been asked already, but after several close fits, but none answering my question I decided to ask outright.

I have developed a series of annotation tools for our office. I have been able to set the class of the items inside the PIO, but the PIO itself is assigned to the active class.

Is there anyway to force the container class, like the Door and window PIOs assign themselves to the appropriate class when Autoclassing is on.

below is a typical PIO

Thanks,

ion

-----------------------------

PROCEDURE DetailBubble;

VAR

LHan :HANDLE;

Note :STRING;

scale :REAL;

BEGIN

{Save Current Attributes for later }

PushAttrs;

{ Get Active Layer Scale, and convert from points }

LHan:=ActLayer;

scale:=GetLScale(LHan)/72*PScale;

{ Set basic text parameters }

TextSize(9*PText_Scale);

TextFace([]);

TextFont(GetFontID('MrHand'));

TextJust(2);

TextVerticalAlign(3);

{ Set basic color & line styles parameters }

PenFore(52428,39321,26214);

PenBack(0);

FillFore(255);

FillBack(0);

PenSize(4);

PenPat(2);

Marker(0, 0.125000, 15);

NameClass('Notes');

{ Set Background fill if checked }

IF PBack_Fill THEN FillPat(1)

ELSE FillPat(0);

{ Draw Circle }

Arc(-13.5*scale,13.5*scale,13.5*scale,-13.5*scale,0,360);

{ Draw Separator }

FillPat(0);

MoveTo(-13.5*scale,0);

Line(27*scale,0);

{ Create Text }

IF PText_Fill THEN FillPat(1) ELSE FillPat(0);

PenFore(61423,7967,7453);{Red}

MoveTo(0, 6.25*scale);

CreateText(PDetail);

MoveTo(0,-6.25*scale);

CreateText(PSheet);

{ Restore original Attributes }

PopAttrs;

END;

Run(DetailBubble);

Link to comment

Well, Ion, they have made it quite difficult, haven't they! Surely this is well documented in the bottom drawer of a filing cabinet in a locked, disused basement lavatory, with a sign on the door saying "Beware of the Leopard".

Anyway: this is one of the few features where the end user can take control. While NNA scripts are encrypted - in the best practise of KGB and Microsoft - the Default Class (and even default values) can be changed.

Signed, while energising the demolition beams, most truly and faithfully yours, the exulted Poet Laureate,

Prostetnic Vogon Jeltz

http://www.bbc.co.uk/cult/hitchhikers/guide/vogon.shtml

Edited by Petri
Link to comment

Thanks Katie, I would say that is where I am headed. It takes time to show value and ROI for added complexities. The beauty of the ten or so tools that I made, the complexity is pre-handled and once we can start reaping the rewards then I can start adding additional value, and dare I breath the term...."Drawing Complexity?"

Thanks,

ion

Link to comment

ion,

The class of the PIO can be assigned to any other class within the pio script. I do this to all pio's within a class so I can hide them if I need to. All you need is the handle of the pio. The following excerpt will change the pio class but keep in mind that the pio will execute twice due to the change. This is also a method to update the pio from other scripts.

PROCEDURE ChangeClass;

{DEBUG}

CONST

kCLS_PLG = 'Plugin-ClassName';

VAR

gObjHdl,gRecHdl,gWallHdl: HANDLE;

gObjName,gPlgClass: STRING;

BEGIN

IF GetCustomObjectInfo(gObjName,gObjHdl,gRecHdl,gWallHdl) THEN

BEGIN

gPlgClass:= GetClass(gObjHdl);

IF gPlgClass <> kCLS_PLG THEN

SetClass(gObjHdl,kCLS_PLG);

{Get parameters and draw object}

END;

END;

Run(ChangeClass);

Link to comment

I strongly advise against "hard-coded" PIO classes. Nevertheless, in a (more or less) Comprehensive System they may be justified: if, say, a specific, pre-defined, view or drawing requires that a PIO is visible, obviously we can't leave the "classing" to the user.

Visibility? Hmmm... Can we force class visibilities with a PIO? Suppose so, but never tried.

As comes to updating PIOs, the good old

SETCLASS(GETCLASS(pioHandle));

works regardless of any hard-coding.

Link to comment
  • 7 years later...

Where are the settings for the Standard Naming saved ?

I mean when I change User X settings for Standard Naming, where is that User X information saved ?

Is it saved in the application folder or the user preferences folder under application support libraries ?

We are trying to establish an office standard and I want to know if these naming standards are stored somewhere that could be sharable between employees?

Thank you

Link to comment

Where are the settings for the Standard Naming saved ?

I mean when I change User X settings for Standard Naming, where is that User X information saved ?

Is it saved in the application folder or the user preferences folder under application support libraries ?

We are trying to establish an office standard and I want to know if these naming standards are stored somewhere that could be sharable between employees?

Thank you

Link to comment

Where are the settings for the Standard Naming saved ?

I mean when I change User X settings for Standard Naming, where is that User X information saved ?

Is it saved in the application folder or the user preferences folder under application support libraries ?

We are trying to establish an office standard and I want to know if these naming standards are stored somewhere that could be sharable between employees?

Thank you

Link to comment

Where are the settings for the Standard Naming saved ?

I mean when I change User X settings for Standard Naming, where is that User X information saved ?

Is it saved in the application folder or the user preferences folder under application support libraries ?

We are trying to establish an office standard and I want to know if these naming standards are stored somewhere that could be sharable between employees?

Thank you

Link to comment

Where are the settings for the Standard Naming saved ?

I mean when I change User X settings for Standard Naming, where is that User X information saved ?

Is it saved in the application folder or the user preferences folder under application support libraries ?

We are trying to establish an office standard and I want to know if these naming standards are stored somewhere that could be sharable between employees?

Thank you

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