Jump to content
Developer Wiki and Function Reference Links ×

IFC and VectorScript


Petri

Recommended Posts

I notice that there are no functions related to IFC. This is a serious shortcoming that should be rectified ASAP!

Also we'd need to be able to generate full reports of IFC data and edit the data, too. I realise that different entity types have different sets data, but we could just create one report for beams, another for columns.

Link to comment

I'll elaborate a bit:

I need to be able to assign home-brewed objects to default IF-classes, with all relevant data. Unfortunately, NNA does not provide eg. hollow-core prefab slabs, not to mention entire floors made of these. "My" users won't be able to convert a floor into an IFC-entity and specify it accordingly. Beams, columns etc: the Devil (=detail) needs to be able to be defined en masse.

Of course a proper Floor object (multi-component, of "path" type) would do the job, but we don't have that, either.

Having said that: the overall implementation of IFC is good. It just needs to be made better!

Link to comment
  • 4 weeks later...

Yes, Charles - thank you for the article. I'm probably missing the point entirely: at least a PIO with this script is useless.

PROCEDURE SimpleIFC;

VAR

h1, h2 :HANDLE;

b :BOOLEAN;

BEGIN

BEGINXTRD(0, PHEIGHT);

Rect(0, 0, PLENGTH, PWIDTH);

ENDXTRD;

h1 := LNewObj;

h2 := CreateCustomObjectN('IFCEntity', 0, 0, 0, FALSE);

b := SetCustomObjectProfile(h2, h1);

SetRField(h2, 'IFCEntity', 'GUID', CreateUUID);

SetRField(h2, 'IFCEntity', 'ifctypestring', 'ifcSlab');

END;

RUN(SimpleIFC);

(Memo to Orso: "SetCustomObjectProfile" is not highlighted in TextWrangler.)

Link to comment

Well, if you're calling CreateCustomObjectN from inside a PIO, that might be your problem. It has been a long time since I tried that, but at least at one time it was not possible to create nested PIOs. The script works fine for me as a document script, so I would guess that this is the problem.

If you really need a PIO inside another PIO, you might try creating a library file with one or more IFC PIOs in it, stored as red symbols. Then you can try to use CopySymbol to insert the symbol inside the currently executing parent PIO.

The reason why this "might" work is that the codepath for CreateCustomObjectN and for CopySymbol is different. I think that CreateCustomObjectN doesn't work simply because nobody ever told it to look inside PIOs for more PIOs to regenerate. The nested PIO might actually be there, but if it doesn't get reset so it can draw something, it might as well not be there. On the other hand, CopySymbol just copies the contents of the specified symbol into the active container. If the symbol is a red symbol, then it's a PIO that's getting pasted into the active container, and it never needs to be reset.

So give that a try. But you probably won't get any parametric control over the nested PIO. In other words, you won't be able to alter the width or height of the PIO, and then call ResetObject on it to get it to pick up the changes. At least that's my guess.

Link to comment

I don't need a PIO inside another PIO. I need a PIO that

(i) makes a hole in a wall in a way recognised by VW's IFC-export

(ii) is parametric in the usual fashion, with all the normal features

(iii) gets translated as an IFC door or window

in this order of importance and without any libraries of "red symbols". In short: I want to be able to create door, window etc. objects that are, to the degree of accuracy of my choice, translated to IFC on one hand and to DWG/DXF on the other hand.

ArchiCAD can do this. It may be that even NNA's doors and windows can, but that I cannot really subtantiate.

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