Jump to content
Sign in to follow this  
ionw

Setting PIO class

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);

Share this post


Link to post

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

Share this post


Link to post
Guest

You can also set up Standard Naming to use classes other than the VW designated class names.

Share this post


Link to post

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

Share this post


Link to post
You can also set up Standard Naming to use classes other than the VW designated class names.

These schemes are not mutually exclusive. If anything, au contraire: there must be (I think) a designated class in the PIO to use other class names. Just an untested theory, though.

Share this post


Link to post
Guest

I'm sorry, I don't understand what you are saying Petri.

If the Door PIO class designation is "Door-Main", then you can map a different class name to "Door-Main" using Standard Naming.

Share this post


Link to post

As I understand, if there is NO default class, the PIO cannot be mapped to some other class. By default, the default class is the default class.

Share this post


Link to post

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);

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...