The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, Gergely Feher

#294846
Hi everyone,

My last trial was base on this idea:

Since GDL does still many legacy parts that haven't been deactivated, I though that if I passed my code from 3D & 2D script to master script, then I may be able to activate and deactivate the cut planes at will (without forgetting the corresponding modifications)

Results:
Although it worked fine in 3D, the object's GUI didn't work as before the modifications were enacted.
#294857
@Lingwisyer & @Barry Kelly

I think I have just found the solution :idea: , that can by pass my problem, but it's not optimised :( although it will work perfectly.

This solution needs a little bit of imagination.

Solution:
  • First, create 2 groups, one for the object in it upright position "object_untrimmed", and the other for the cutting plane & the previous defined group "object_trimmed"; all at the top of the "3D Script".
  • Second, always place the group "object_trimmed", that way you will always get the correct cut plan representation in plans.
  • Third, create a parameter for activating elevation on plan.
  • Fourth, in the "3D Script" create an "if" condition that will place the "object_untrimmed" rotated around one of the X or Y or Z axis.
    That way you will always use the same "PROJECT2" (or one of its variants) for the same purpose view type.
  • Fifth, in case you need to modify the Elevation on plan in the 2D view, you will have to remember that you will have to control it in the "3D Script".
  • Sixth, don't forget to kill the groups.
Please if you have a better idea than this one, I will gladly hear/read it.
#294881
Still wonder why Project2{4} was not working for you... Would have been so much easier, but why mine was not working is different to why yours was not so we are still lost on that...



Ling.
#294882
@Lingwisyer

Correction, it worked for you and for me, the difference was in the needs that required different answers.

Your script for "Project2{4}" made clear that the cut part of your object may be costumed specified by the user as s/he pleases, which was not my case.

In my script I needed to maintain the building material indices, fills colours and pens unaltered by the 2D script, and when you couple that with the methods and parts specification that I have used with the different types of holes and voids that can specified by the user, your options would simply don't work in my case.

Unless there is a condition that is altering the results in my object that we aren't aware of.
#294884
Right, the pens are the main disadvantage of Project2. Really do not get why it has to overwrite all of the pen weights...



Ling.