Jump to content

rebu1985

Member
  • Posts

    42
  • Joined

  • Last visited

Posts posted by rebu1985

  1. Hi guys,

     

    I would like to try to get a function or script which helps me to calculate automatically the final value attached to the end of a line adding pre-values along the path. As you can see guys below, depends on the value at the end of a line, the script should recognize the value range and show on the drawing the correct diameter dimension/text.

    I was thinking if its possible to attach a record format at the beginning of the paths when you select all the lines and create a script which recognize the lines intersections and show the correct value.


    Thanks guys!!

    Captura de pantalla 2017-04-25 a las 12.13.35.png

  2. Hi guys,

     

    I have done a script to hide some fields of the default PIO 'Desk' because I just need some parameters to work. The plug-in is compiled right but when its not working because nothing is done. My version is VW14.

    My idea is to create different script for default PIO doors and windows but using a few parameters. 

     

    My script is below:

     

     

    PROCEDURE Modifydesk;
    VAR
    objHd: HANDLE;

    BEGIN
    objHd:= GetObject('Desk');

        IF objHd=NIL THEN 
        EnableParameter(objHd, 'Leg Height', FALSE);
        SetParameterVisibility(objHd, 'Leg Height', FALSE);
    END;
    RUN (Modifydesk);

  3. Hi guys,

     

    I have created a predefined text style to use in my standard dimensions options. I was checking to change the text style manually and i cant do it because when i try it the text style changes to a new undefined one. I would like to know if its possible to create a script with modify any text style (font, size, etc) by myself. I was checking the function 'SetTextStyle' but i am not sure if its the correct one.

     

    For example: I have a text style called dimensions with Arial 8pt and bold and i would like to change by Calibri 10 pt and not font style.

     

    Thanks!!

  4. Hi MullinRJ,

     

    I have been working on your comments to do my script and i have done this. I still have some mistakes and i guess its about the array function.

    Could you help me, please?

     

     

    PROCEDURE dialogl_Main;
        VAR
        dialog1 : INTEGER;

        PROCEDURE dialog1_Setup;
        BEGIN
            dialog1 := CreateLayout( 'CreateListBox', FALSE, 'OK', 'Cancel' );
            CreateListBoxN( dialog1, 4, 30, 10, TRUE );
            SetFirstLayoutItem( dialog1, 4 );
        END;

        PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
        VAR
        i        : INTEGER;
        nl        : INTEGER;
        layers    : DYNARRAY OF STRING;
        h        : HANDLE;
        
        BEGIN
            CASE item OF
                SetupDialogC:
                BEGIN
                    
                    AddChoice( dialog1, 4, 'PLANTA 1', 0 );
                    AddChoice( dialog1, 4, 'PLANTA 2', 0 );
                    AddChoice( dialog1, 4, 'PLANTA 3', 0 );
                    
                END;
            1:    BEGIN
                GetSelectedChoiceInfo(dialog1, 4, 1, i, layers);
                END;
            4:    BEGIN
                nl:=NumLayers;
                Layers:=GetLNAME (h);
                DoMenuTextByName('Copy', 0);
                FOR i:=1 TO nl DO BEGIN
                DoMenuTextByName('Paste In Place', 0);
            END;
        END;

    BEGIN
        dialog1_Setup;
        IF RunLayoutDialog(dialog1, Dialog_Handler) = 1 THEN BEGIN
    END;

    RUN(dialogl_Main);

  5. hi guys,

     

    I have created my dialog code for copying objects to selected layers.

    All info which i have found its about copying objects to all layers but i would like to know how to do it if I just wanna duplicate to selected ones. I dont know how the script should be to transfer the info from the dialog to the object.

     

    PROCEDURE CreateDialog;

    VAR result : INTEGER;

    id : INTEGER;

    BEGIN

    id := CreateLayout('Revise Layer Link',TRUE,'ok', 'Cancel');

    CreateStaticText(id,4,'Layers:',-1);

    CreatePulldownMenu(id,5,32);

    CreateGroupBox(id,6,'Layers Options',TRUE);

    CreateCheckBox(id,7,'Planta Sótano');

    CreateCheckBox(id,8,'Planta Baja');

    CreateCheckBox(id,9,'Planta 1');

    CreateCheckBox(id,10,'Planta 2');

    CreateCheckBox(id,11,'Planta 3');

    CreateCheckBox(id,12,'Planta 4');

    CreateCheckBox(id,13,'Planta 5');

    CreateCheckBox(id,14,'Planta 6');

    CreateCheckBox(id,15,'Planta 7');

    CreateCheckBox(id,16,'Planta 8');

    CreateCheckBox(id,17,'Planta Atico');

    CreateCheckBox(id,18,'Planta Cubierta');

    SetFirstLayoutItem(id, 4);

    SetBelowItem (id,4,6,0,0);

    SetFirstGroupItem(id,6,7);

    SetBelowItem (id,7,8,0,0);

    SetBelowItem (id,8,9,0,0);

    SetBelowItem (id,9,10,0,0);

    SetBelowItem (id,10,11,0,0);

    SetBelowItem (id,11,12,0,0);

    SetBelowItem (id,12,13,0,0);

    SetBelowItem (id,13,14,0,0);

    SetBelowItem (id,14,15,0,0);

    SetBelowItem (id,15,16,0,0);

    SetBelowItem (id,16,17,0,0);

    SetBelowItem (id,17,18,0,0);

    SetBelowItem(id,18,30,0,0);

    SetBelowItem(id,30,40,0,0);

    result := RunLayoutDialog(id,NIL) END;
    RUN (CreateDialog);

     

  6. Hi guys,

     

    I have been working on the script and i have done this one. The script is still wrong and I dont know the answer.

    Could you help me guys, please?

     

    PROCEDURE CreateDialog;
    VAR
    h: HANDLE;
    nl,i,a: INTEGER;
    layer : STRING;
    dupl,go,ok : BOOLEAN;
    Layers: DYNARRAY OF STRING;

    FUNCTION 
    result : INTEGER;
    VAR id : INTEGER;
    BEGIN
    id := CreateLayout('Revise Layer Link',TRUE,'ok', 'Cancel');

    CreateStaticText(id,4,'Layers:',-1);
    CreatePulldownMenu(id,5,32);

    CreateCheckBox(dialogID,30,'Follow objects');

    CreateCheckBox(id,40,'duplicate objects');
    CreateGroupBox(id,6,'Layers Options',TRUE);
    CreateCheckBox(id,7,'Planta Sótano');
    CreateCheckBox(id,8,'Planta Baja');
    CreateCheckBox(id,9,'Planta 1');
    CreateCheckBox(id,10,'Planta 2');
    CreateCheckBox(id,11,'Planta 3');
    CreateCheckBox(id,12,'Planta 4');
    CreateCheckBox(id,13,'Planta 5');
    CreateCheckBox(id,14,'Planta 6');
    CreateCheckBox(id,15,'Planta 7');
    CreateCheckBox(id,16,'Planta 8');
    CreateCheckBox(id,17,'Planta Atico');
    CreateCheckBox(id,18,'Planta Cubierta');

    SetFirstLayoutItem(id, 4);
    SetBelowItem (id,4,6,0,0);
    SetFirstGroupItem(id,6,7);
    SetBelowItem (id,7,8,0,0);
    SetBelowItem (id,8,9,0,0);
    SetBelowItem (id,9,10,0,0);
    SetBelowItem (id,10,11,0,0);
    SetBelowItem (id,11,12,0,0);
    SetBelowItem (id,12,13,0,0);
    SetBelowItem (id,13,14,0,0);
    SetBelowItem (id,14,15,0,0);
    SetBelowItem (id,15,16,0,0);
    SetBelowItem (id,16,17,0,0);
    SetBelowItem (id,17,18,0,0);

    SetBelowItem(id,18,30,0,0);

    SetBelowItem(id,30,40,0,0);

    SetHelpString(a,'Select a layer to transfer your selected object');

    SetHelpString(30,'Go to the selected option with the actual visibility settings');

    SetHelpString(40,'Select to duplicate your selected object');


    result := RunLayoutDialog(id,NIL)
    END;

    Procedure GetLayers;

    BEGIN

    nl:= NumLayers;

    ALLOCATE Layers[1..nl];

    h:=FLayer;

    For i:=1 TO nl DO BEGIN

    Layers:=GetLNAME(h);
    END;

    END;

     

    Procedure Drive_LayerClass;
    VAR 
    item: LONGINT; 
    data: LONGINT;
    BEGIN
    CASE item OF SetupDialogC
    BEGIN GetLayers; IF Layers=layer THEN SELChoice(a,i,ok);
    END; OK:=TRUE; END;
    BEGIN GetSelChoice(a,0,i,Layers);

    go:=ItemSel(30);

    dupl:=ItemSel(40);
    END;
    END;
    END;
    END;

    RUN(CreateDialog);

  7. Hi guys,

     

    I have found in the forum a topic which i would like to know because it would be really useful for me. You can find below:

     

    Copy object(s) to Paste (this step is performed pre vs execution)

    Execute vs

    1. VS Brings up a dialog window with available design and sheet layers

    2. User selects layer(s) on to which the object(s) to be pasted in place

    3. Click "OK"

    4. Layer visibility set to "Active Only", the script activates each selected layer

    in turn and pastes in place initially copied object(s)

     

    The purpose of this script its to have some objects (stairs, lifts, structure,etc) of a building keep in the same position in different design layers (they work as floor levels).

     

    Laura

    • Like 1
  8. Thanks Hippocode,

     

    I was thinking to do that or convert to property line as well.

    I have created the script below but something is wrong because the second part of the script is not working.

    - I would like to show the visibility on of class called 0Muros at the same time than the active class 0Sup and hide the others but when the script just works showing the visibility of the 0sup and all the others are hidden.

    - I tried to add more classes as ShowClass((('0Muros') & ('0Muros2'))); but script indicates that i need a string. Could you help me, please?

     

    PROCEDURE xxx;
    VAR
        H :Handle;
        Active_class : String;
    BEGIN
        H := FActLayer;
        Active_class:= GetClass(H);
        NameClass('0Sup');
        SetClassOptions(1);
    IF ((GetCVis('Active_class')) = 0) THEN
        Begin
        ShowClass('0Muros');    
        CallTool(-207);        { Polygon tool, Bucket mode }
        DelObject(FActLayer);
    end;
    END;
    Run(xxx);

  9. Thank you guys for your help!!

     

    I have created this script but I would like to ask you 2 questions if you can help me :)

    - I would like to show another extra class class called 0Door plus the active one 0Wall.

    - I would like to show a label as the space function indicating the Room and the area. I was thinking to convert this script to Space but i am not sure what is easier and better. 

     

    PROCEDURE xxx;
    VAR
        H, H1 :Handle;
        Active_class : String;
    BEGIN
        H := FActLayer;
        Active_class:= GetClass(H1);
        NameClass('0Wall');
        SetClassOptions(1);
        CallTool(-207);        { Polygon tool, Bucket mode }
        Message ('Area = ', HAreaN(FActLayer));
        DelObject(FActLayer);
    END;
    Run(xxx);

×
×
  • Create New...