Jump to content

Julian Carr

Distributor
  • Content Count

    182
  • Joined

  • Last visited

Posts posted by Julian Carr


  1. Try this slight variation (untested):

     

    Procedure SomeCalloutMrgnDialog;
    Var    
        H1:Handle;
        B1:Boolean;
        MrgnCall, MrgnValue,LyrScale:Real;
        MrgnValueStrng,default,request:String;

    Procedure GetValues;
    Begin
        
        request:='CallOut PIO Page Unit Margin';
        default:='0.0625';
        
        MrgnCall:=DistDialog(request,default);
        
        LyrScale:=GetLScale(ActLayer);
        MrgnValue:=LyrScale*MrgnCall;
        
        MrgnValueStrng:=Concat(MrgnValue);
    End;

    Procedure SetObj_Value(H1:Handle);
    Begin
        
        SetRField(H1,'Callout','Margin',MrgnValueStrng);
        
        ResetObject(H1);
        
        SetDSelect(H1);
        
    End;
        

    Begin
        GetValues;
        ForEachObject(SetObj_Value,(((VSEL=TRUE) & (PON='Callout'))));
        DoMenuTextByName('Previous Selection',0);
        
    End;
    Run(SomeCalloutMrgnDialog);


  2. It's possible you have picked up an invisible character by copying from the browser. Try deleting the last line and everything below it then retyping it manually. Or copy the script to a text editor and turn on invisible characters to see if you can spot something.


  3. You can do this using the single most powerful procedure in VS: ForEachObject. It also filters out other object so will only affect dimensions in this case.

     

    PROCEDURE DimTypical;

    PROCEDURE DoIt(h1 : HANDLE);
    BEGIN
        SetObjectVariableString(h1, 10, ' Typ.');
        ResetObject(h1);
    END;
    BEGIN
        ForEachObject(DoIt, (T=DIMENSION) & Sel);
    END;
    Run(DimTypical);


  4. It works for me Sam and definitely needs to be in the kObjOnInitXProperties event (5). It's possible it also needs this:

     

    CONST

        kObjXPropAcceptStates = 18;

     

        gFlag := SetObjPropVS(kObjXPropAcceptStates, TRUE); 

     

    Also have you tried quitting and restarting Vw? I find this necessary sometimes even in developer mode.


  5. CONST
       kObjXPropShowPrefDialogWhen = 32;
        kCustomObjectPrefNever      = 0;
        kCustomObjectPrefAlways      = 1;
        kCustomObjectPrefNew         = 2;

     

    blah blah blah...

     

    in event loop 5:

        gFlag := SetObjPropCharVS(kObjXPropShowPrefDialogWhen, Chr(kCustomObjectPrefNever));

     


  6. Wall styles don't typically define wall heights. Rather they define what is used to control the wall or components heights (layer wall height, storey level, etc), as well as having an offset. And of course walls don't have to be level on the top or bottom, and can also be controlled by slabs and roofs, making the task even more fraught. But if you really want to delve into it, then look in the Function Reference in the Objects - Architectural section, for things like SetComponentWallTopOffset().


  7. It's conceivable but would be messy, and could also be problematic if there were so many hatches that the dialogue was too large to fit on the screen. Normally you would would use a list browser for something like this, which would see scroll bars appear if the list was longer than the size of the list browser.

 

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