Jump to content

Yancka

Member
  • Posts

    136
  • Joined

  • Last visited

Posts posted by Yancka

  1. I just sticked with same issue. =Deg2Rad(angle) works only if a number is entered instead of "angle". I tried to use a reference to another cell, it didn't work with "FramingMember.pitch" cell but was working with if I entered a number instead of formula in that cell. I think the question is about format in which the result is given. The ? symbol behind the number makes the mess. And WV Worksheets obviously are lacking of sufficient possibilities to manipulate with numbers and text strings to retrieve it in usable format or with usable content (? symbol stripped out).

    My guess is that you were trying to calculate the length of framing member with formula like =(FramingMember.LineLength+FramingMember.overhang)/cosDEG2RAD(FramingMember.pitch), am I correct?

    Otherwise - this calculation could be easily included in Framing member PIO, giving possibility to retrieve length of an element with single record.field call (for example, FramingMember.Length). There are 2 ways out of this - give this as a wishlist item and wait for next release of VW with a hope this will be included, or - make your own PIO which does exactly what you want.

  2. An interesting note. I have found by rotating the object 90 deg in front view enables me to have a fully vertical column.

    On VW2009 it doesn't. I'm getting message "This operation only works on hybrid objects in plan projection". Though, I hope we both are talking about same thing - Framing Member....

    Regarding original subject - there indeed is a need for 1 object which would allow to create the whole structural construction and then to be included in schedules. Currently construction can be made combining Framing Member (for beam and rafter type objects) and Column (for vertical elements) - and the scheduling is an issue.

  3. The triangular window is an interesting innovation.

    I disagree on this. Triangular or custom shape windows aren't innovation. It's just possibility to make same things otherwise, which has been practiced through ages.

    It looks like you are making an enclosed light well -- so that the triangular window acts as a skylight for the first floor.

    This is exactly how it works - you've got the idea!

  4. The Tool which is shipped with VW is nice but I want to have it more automatic way. The purpose of my tool would be to use it only in section/elevation viewports and have values automatically from it's location within VP.

    So, is it possible and how:

    1. get scale of VP in which the PIO is inserted = active VP scale?

    2. get Y coordinate in VP which represents Layer Z = 0 ("Building 0 height Y coordinate in current VP")?

    3. create text within PIO displaying info "PIO insertion Y coordinate"-"Building 0 height Y coordinate in current VP"? (optionally, if needed, the result is multiplied with current VP scale)

    Any other ideas on how to achieve it?

  5. I'm trying to make Roof object and succeed to make it until certain level (Picture 3). What I'm missing is possibility to make the higher gable (horizontal) to continue until the lower gable (vertical) and create triangle window in the space there (Picture 5). The concept would be to make what in VW is called "Dutch Hip", but I don't succeed, nevertheless the option isn't grayed out.

    Any hints on making it with roof object? Or ungroup and then adjust roof faces?

  6. Problem solved. It was Issue Undo Warning setting in VW Session preferences.

    Solution in code:

    VAR
    InitialIssueUndoWarningsStatus : BOOLEAN;
    BEGIN
    InitialIssueUndoWarningsStatus:=GetPref(19);
    SetPref(19,false);
    ....
    ....
    DoMenuTextByName('Convert to Generic Solids',0);
    ....
    ....
    SetPref(19,InitialIssueUndoWarningsStatus);
    END;

  7. Actually one part of problem was that at the beginning the 3D object is simple extrude which cannot be converted to generic solid. Therefore was that 1st message.

    The only current issue is with "Convert to Generic Solids" command. VW Help states that after applying command on valid 3D object "A warning dialog box opens. Click OK to convert the object(s)."

    Is there a way to get rid of this warning message?

  8. I've found that making drawing with custom PIOs containing complex 3D objects results in quite large file sizes. Therefore I decided that will convert the solid subtraction to generic solid. And doing so indeed reduces the file size much.

    The problem is with process of converting solid into a generic one. Since I didn't find appropriate function/procedure, I managed to get it with:

    DoMenuTextByName('Convert to Generic Solids',0);

    After inserting this line in PIO's code, the result is achieved, but also 2 warning messages appear:

    1. when PIO is inserted first time or LineLength is changed, the message states that there are selected also objects which can't be converted and they are deselected now. How to make selection by handle of an object and as a result have selected 1 object?

    2. When PIO's parameters get changed, appears warning message about not being able to edit solid once it is generic.

    Any ideas on how to make generic solid without these warning messages?

  9. Here're 2 pieces of steel beam plugins - single beam (child) and assembly beam (parent). Take it as is (no cool icons). If you happen to notice any errors there, don't hesitate to post it here. Also if you make some useful additions & modifications. The biggest deal is with standard sizes.... errrrr. Into these PIOs there are only couple standard sizes.

    Assembly, sounds like a good stuff. Me wonders whether you are messing up with Standard & Custom sizes in your multilevel PIOs and if you do, how are you dealing with size settings.

  10. You cannot get values for the child pio because it has not been created yet. The mother pio needs to complete to actually create the child.

    Sounds quite reasonable. Thanks!

    I guess that leaves no other option than store standard size information in both - child & parent plugins. I was hoping there would be a workaround for it.

  11. I'm "treading in unchartered territory" of nested PIOs. Need some help.

    Child PIO is "2D Quadrilateral", mother PIO is "2D Quadrilateral Assembly". Into assembly PIO I insert 2 "2D Quadrilateral" instances. The first one is rectangle. The second is square. I want to place the square besides the rectangle (I'm using HMove). For that I need to calculate the distance. I fail to get the actual distance with

    "MidRectWidth:=Str2Num(GetRField(MidRect,'2D Quadrilateral','Box Width'));"

    I'm getting only default value for 'Box Width' parameter. Meantime in schedules everything is OK and the values are correct.

    May be this is due to some shortcomings in overall logics of my PIOs and standard size settings? The code of "2D Quadrilateral":

    PROCEDURE Quadrilateral;
    VAR
    RectWidth, RectHeight :REAL;
    PluginHandle, PluginRecordHandle, PluginWallHandle :HANDLE;
    PluginName :STRING;
    BEGIN
    IF GetCustomObjectInfo(PluginName,PluginHandle,PluginRecordHandle,PluginWallHandle) THEN BEGIN
    RectWidth:=PBox_Width;
    RectHeight:=PBox_Height;
    {PluginHandle:=FSactLayer;}
    
    IF PCustom_size=false THEN
    	BEGIN
    		EnableParameter(PluginHandle,'Box Width',false);
    		EnableParameter(PluginHandle,'Box Height',false);
    		IF PQuadrilateral_type='Square' THEN
    			BEGIN
    				IF PSquare_standard_size='A1' THEN RectWidth:=350;
    				IF PSquare_standard_size='A2' THEN RectWidth:=680;
    				IF PSquare_standard_size='A3' THEN RectWidth:=975;
    			END;
    		IF PQuadrilateral_type='Rectangle' THEN
    			BEGIN
    				IF PRectangle_standard_size='T1' THEN BEGIN RectWidth:=350; RectHeight:=680; END;
    				IF PRectangle_standard_size='T2' THEN BEGIN RectWidth:=680; RectHeight:=975; END;
    				IF PRectangle_standard_size='T3' THEN BEGIN RectWidth:=975; RectHeight:=1550; END;
    			END;
    	END
    ELSE
    	BEGIN
    		EnableParameter(PluginHandle,'Square standard size',false);
    		EnableParameter(PluginHandle,'Rectangle standard s',false);
    	END;
    
    IF PQuadrilateral_type='Rectangle' THEN SetParameterVisibility(PluginHandle,'Square standard size',false) ELSE
    	BEGIN
    		SetParameterVisibility(PluginHandle,'Rectangle standard s',false);
    		EnableParameter(PluginHandle,'Box Height',false);
    		RectHeight:=RectWidth;
    	END;
    
    SetRField(PluginHandle,'2D Quadrilateral','Box Width',Num2Str(0,RectWidth));
    SetRField(PluginHandle,'2D Quadrilateral','Box Height',Num2Str(0,RectHeight));
    
    MoveTo(-RectWidth/2,0);
    Rect(-RectHeight,#90,RectWidth,#0);
    END;
    END;
    Run(Quadrilateral);

    And the code of "2D Quadrilateral Assembly":

    PROCEDURE QuadrilateralAssembly;
    VAR
    PluginHandle, PluginRecordHandle, PluginWallHandle, MidRect, LeftSquare :HANDLE;
    PluginName :STRING;
    XOffset, MidRectWidth, LeftSquareWidth: REAL;
    
    BEGIN
    IF GetCustomObjectInfo(PluginName,PluginHandle,PluginRecordHandle,PluginWallHandle) THEN BEGIN
    
    MidRect:=CreateCustomObjectN('2D Quadrilateral',0,0,0,false);
    SetRField(MidRect,'2D Quadrilateral','Quadrilateral type','Rectangle');
    SetRField(MidRect,'2D Quadrilateral','Rectangle standard s',GetRField(PluginHandle,'2D Quadrilateral Assembly','Rectangle standard s'));
    SetRField(MidRect,'2D Quadrilateral','Custom size','false');
    
    LeftSquare:=CreateCustomObjectN('2D Quadrilateral',0,0,0,false);
    SetRField(LeftSquare,'2D Quadrilateral','Quadrilateral type','Square');
    SetRField(LeftSquare,'2D Quadrilateral','Custom size','false');
    
    MidRectWidth:=Str2Num(GetRField(MidRect,'2D Quadrilateral','Box Width'));
    LeftSquareWidth:=Str2Num(GetRField(LeftSquare,'2D Quadrilateral','Box Width'));
    XOffset:=-(MidRectWidth+LeftSquareWidth)/2;
    HMove(LeftSquare,XOffset,0);
    END;
    END;
    Run(QuadrilateralAssembly);

  12. If several instances of my custom made PIO are selected and some parameters are changed to all selected instances simultaneously the following issues appear:

    1. In OIP all parameters are visible and are enabled.

    2. Only 1 PIO is OK, others are kinda broken until some parameter of specific PIO instance is changed.

    3. In the schedule (quickest method to check this is to create a report) sizes are OK only to this 1 PIO.

    If working with 1 only PIO everything looks just fine. Problem persists only if working with 2 or more PIOs and they are standard size (Standard size parameter is unchecked). Would there be a problem with logics of how I've made up setting standard sizes? Or would the problem be in function I use to retrieve object handle (FSactLayer) and the solution would be to foresee possibility of multiple selection and then cycle through selection set? If last one seem to be correct, pls give some hint on how to include such cycle into code of PIO.

    Here's the code of simple plug-in I wrote to check this:

    PROCEDURE Quadrilateral;
    VAR
    RectWidth, RectHeight :REAL;
    PluginHandle :HANDLE;
    BEGIN
    RectWidth:=PBox_Width;
    RectHeight:=PBox_Height;
    PluginHandle:=FSactLayer;
    
    IF PCustom_size=false THEN
    	BEGIN
    		EnableParameter(PluginHandle,'Box Width',false);
    		EnableParameter(PluginHandle,'Box Height',false);
    		IF PQuadrilateral_type='Square' THEN
    			BEGIN
    				IF PSquare_standard_size='A1' THEN RectWidth:=350;
    				IF PSquare_standard_size='A2' THEN RectWidth:=680;
    				IF PSquare_standard_size='A3' THEN RectWidth:=975;
    			END;
    		IF PQuadrilateral_type='Rectangle' THEN
    			BEGIN
    				IF PRectangle_standard_size='T1' THEN BEGIN RectWidth:=350; RectHeight:=680; END;
    				IF PRectangle_standard_size='T2' THEN BEGIN RectWidth:=680; RectHeight:=975; END;
    				IF PRectangle_standard_size='T3' THEN BEGIN RectWidth:=975; RectHeight:=1550; END;
    			END;
    	END
    ELSE
    	BEGIN
    		EnableParameter(PluginHandle,'Square standard size',false);
    		EnableParameter(PluginHandle,'Rectangle standard size',false);
    	END;
    
    IF PQuadrilateral_type='Rectangle' THEN SetParameterVisibility(PluginHandle,'Square standard size',false) ELSE
    	BEGIN
    		SetParameterVisibility(PluginHandle,'Rectangle standard size',false);
    		EnableParameter(PluginHandle,'Box Height',false);
    		RectHeight:=RectWidth;
    	END;
    
    SetRField(PluginHandle,'2D Quadrilateral','Box Width',Num2Str(0,RectWidth));
    SetRField(PluginHandle,'2D Quadrilateral','Box Height',Num2Str(0,RectHeight));
    
    MoveTo(-RectWidth/2,0);
    Rect(-RectHeight,#90,RectWidth,#0);
    END;
    Run(Quadrilateral);
    

  13. I'm looking for the answer, does it seem possible to create ferroconcrete slab object (would it be command, plug-in or smth else, doesn't matter)?

    The source would be 3D and 2D objects, the outcome would be an object with properties like these:

    1. certain top elevation,

    2. certain thickness

    3. on sides where 2D lines were the edge is straight,

    4. on edges where there were shaped 3D objects as determining elements, the shape is made as something like solid subtraction (in other words - concrete is filled until outer shape of object).

    As of armature, I don't think it's so big issue as body of concrete. See attached file for desired 3D object. Any thoughts, hints, ideas?

  14. Got it. And nested the same plugin into itself. Actually made it recursive. One time even made it recursive indefinitely and had to kill VW... :)

    The current issue is parameter visibility. If I insert my custom plugin '3D Steel Beam' into itself with different parameter settings on OIP visible parameter set is the one for last inserted instance. Ie, if last inserted '3D Steel Beam' is I-beam then I-Beam visibility set takes precedence, nevertheless mother '3D Steel Beam' visibility set is set for Assembly (word game - I named combined beam 'Assembly' in order to memorize Assembly within this plug-in for his assistance on VS. Yet have to figure which part could be named 'Miguel' :)). If child '3D Steel Beam' insertion code is commented out the parameter visibility is OK.

    Is there a workaround for this?

    Or should I make another PIO which then would be mother PIO for '3D Steel Beam' PIOs?

    Assembly, 3-4 layers deep nested plug-ins sound intriguing. Just curiosity - what type of objects you make in such manner and what is purpose of doing so?

    The long code again, current version:

    {3D Steel Beam; V1.7; written by Janis Prodnieks}
    PROCEDURE SteelBeam;
    VAR
    BeamLength, ItemElevation, BeamHeight, BeamWidth, WebThickness, FlangeThickness, FiletRadius, FiletRadius2, BeamDiameter, TempReal, TextX, TextY :REAL;
    DocumentTextStyle :INTEGER;
    ExtrHnd, PluginHandle, LeftLBeam, RightLBeam, MainIBeam :HANDLE;
    ItemNumber, BeamType :STRING;
    {---- ---- ---- ---- ---- ---- PROFILE PROCEDURES ---- ---- ---- ---- ---- ----}
    PROCEDURE IBeamProfile(h,b,s,t,R1 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(b/2,0);
    	AddPoint(b/2,-t);
    	AddPoint(s/2+R1,-t);
    	ArcTo(s/2,-t,R1);
    	AddPoint(s/2,-h+t+R1);
    	ArcTo(s/2,-h+t,R1);
    	AddPoint(b/2,-h+t);
    	AddPoint(b/2,-h);
    	AddPoint(-b/2,-h);
    	AddPoint(-b/2,-h+t);
    	AddPoint(-s/2-R1,-h+t);
    	ArcTo(-s/2,-h+t,R1);
    	AddPoint(-s/2,-t-R1);
    	ArcTo(-s/2,-t,R1);
    	AddPoint(-b/2,-t);
    EndPoly;
    END;
    
    PROCEDURE UBeamProfile(h,b,s,t,R1,r2 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(b/2,0);
    	AddPoint(b/2,-t+r2);
    	ArcTo(b/2,-t,r2);
    	AddPoint(-b/2+s+R1,-t);
    	ArcTo(-b/2+s,-t,R1);
    	AddPoint(-b/2+s,-h+t+R1);
    	ArcTo(-b/2+s,-h+t,R1);
    	AddPoint(b/2-r2,-h+t);
    	ArcTo(b/2,-h+t,r2);
    	AddPoint(b/2,-h+t-r2);
    	AddPoint(b/2,-h);
    	AddPoint(-b/2,-h);
    EndPoly;
    END;
    
    
    PROCEDURE LBeamProfile(h,b,t,R1,r2 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(-b/2,-h);
    	AddPoint(b/2,-h);
    	AddPoint(b/2,-h+t-r2);
    	ArcTo(b/2,-h+t,r2);
    	AddPoint(-b/2+t+R1,-h+t);
    	ArcTo(-b/2+t,-h+t,R1);
    	AddPoint(-b/2+t,-r2);
    	ArcTo(-b/2+t,0,r2);
    EndPoly;
    END;
    
    
    PROCEDURE RectBeamProfile(h,b,s: REAL);
    VAR
    OuterPolyH, HolePolyTemplateH: HANDLE;
    R1: REAL;
    BEGIN
    R1:=2.5*s;
    IF s<6 THEN R1:=2*s;
    IF s>10 THEN R1:=3*s;
    BeginPoly;
    	AddPoint(-b/2+R1+s,0);
    	AddPoint(b/2-R1-s,0);
    	ArcTo(b/2,0,R1+s);
    	AddPoint(b/2,-R1-s);
    	AddPoint(b/2,-h+R1+s);
    	ArcTo(b/2,-h,R1+s);
    	AddPoint(b/2-R1-s,-h);
    	AddPoint(-b/2+R1+s,-h);
    	ArcTo(-b/2,-h,R1+s);
    	AddPoint(-b/2,-h+R1+s);
    	AddPoint(-b/2,-R1-s);
    	ArcTo(-b/2,0,R1+s);
    EndPoly;
    OuterPolyH:=LNewObj;
    BeginPoly;
    	AddPoint(-b/2+R1+s,-s);
    	AddPoint(b/2-R1-s,-s);
    	ArcTo(b/2-s,-s,R1);
    	AddPoint(b/2-s,-R1-s);
    	AddPoint(b/2-s,-h+R1+s);
    	ArcTo(b/2-s,-h+s,R1);
    	AddPoint(b/2-R1-s,-h+s);
    	AddPoint(-b/2+R1+s,-h+s);
    	ArcTo(-b/2+s,-h+s,R1);
    	AddPoint(-b/2+s,-h+R1+s);
    	AddPoint(-b/2+s,-R1-s);
    	ArcTo(-b/2+s,-s,R1);
    EndPoly;
    HolePolyTemplateH:=LNewObj;
    IF AddHole(OuterPolyH,HolePolyTemplateH) THEN DelObject (HolePolyTemplateH);
    END;
    
    
    PROCEDURE RoundBeamProfile(D,t: REAL);
    VAR
    OuterPolyH, HolePolyTemplateH: HANDLE;
    BEGIN
    Oval(-D/2,0,D/2,-D);
    OuterPolyH:=LNewObj;
    Oval(-D/2+t,0-t,D/2-t,-D+t);
    HolePolyTemplateH:=LNewObj;
    IF AddHole(OuterPolyH,HolePolyTemplateH) THEN DelObject (HolePolyTemplateH);
    END;
    {---- ---- ---- ---- ---- ---- PLUG-IN SPECIFIC OTHER SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetInitialParameterVisibility;
    BEGIN
    SetParameterVisibility(PluginHandle,'I Beam Size',false);
    SetParameterVisibility(PluginHandle,'U Beam Size',false);
    SetParameterVisibility(PluginHandle,'L Beam Size E',false);
    SetParameterVisibility(PluginHandle,'L Beam Size NE',false);
    SetParameterVisibility(PluginHandle,'Sq Beam Size',false);
    SetParameterVisibility(PluginHandle,'Rect Beam Size',false);
    SetParameterVisibility(PluginHandle,'Round Beam Size',false);
    SetParameterVisibility(PluginHandle,'Height h',false);
    SetParameterVisibility(PluginHandle,'Width b',false);
    SetParameterVisibility(PluginHandle,'Web Thickness s',false);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',false);
    SetParameterVisibility(PluginHandle,'Radius R',false);
    SetParameterVisibility(PluginHandle,'Radius  r',false);
    SetParameterVisibility(PluginHandle,'Diameter D',false);
    SetParameterVisibility(PluginHandle,'Flip h and b',false);
    SetParameterVisibility(PluginHandle,'Flip vertically',false);
    
    SetParameterVisibility(PluginHandle,'L-Beam on Side',false);
    SetParameterVisibility(PluginHandle,'Left LB type',false);
    SetParameterVisibility(PluginHandle,'LLB Size E',false);
    SetParameterVisibility(PluginHandle,'LLB Size NE',false);
    SetParameterVisibility(PluginHandle,'LLB Custom Size',false);
    SetParameterVisibility(PluginHandle,'LLB Height h',false);
    SetParameterVisibility(PluginHandle,'LLB Width b',false);
    SetParameterVisibility(PluginHandle,'LLB Flange t',false);
    SetParameterVisibility(PluginHandle,'LLB Radius R',false);
    SetParameterVisibility(PluginHandle,'LLB Radius  r',false);
    SetParameterVisibility(PluginHandle,'LLB flip h and b',false);
    SetParameterVisibility(PluginHandle,'Right LB type',false);
    SetParameterVisibility(PluginHandle,'RLB Size E',false);
    SetParameterVisibility(PluginHandle,'RLB Size NE',false);
    SetParameterVisibility(PluginHandle,'RLB Custom Size',false);
    SetParameterVisibility(PluginHandle,'RLB Height h',false);
    SetParameterVisibility(PluginHandle,'RLB Width b',false);
    SetParameterVisibility(PluginHandle,'RLB Flange t',false);
    SetParameterVisibility(PluginHandle,'RLB Radius R',false);
    SetParameterVisibility(PluginHandle,'RLB Radius  r',false);
    SetParameterVisibility(PluginHandle,'RLB flip h and b',false);
    END;
    
    
    
    PROCEDURE SetInitialVariables;
    BEGIN
    ClosePoly;
    
    PluginHandle:=FSactLayer;
    ItemNumber:= PNumber;
    
    BeamLength:= PLineLength;
    ItemElevation:= PTop_Elevation;
    BeamHeight:= PHeight_h;
    BeamWidth:= PWidth_b;
    WebThickness:= PWeb_Thickness_s;
    FlangeThickness:= PFlange_Thickness_t;
    FiletRadius:= PRadius_R;
    FiletRadius2:= PRadius__r;
    BeamDiameter:=PDiameter_D;
    TextX:=PControlPoint01X;
    TextY:=PControlPoint01Y;
    END;
    
    
    PROCEDURE SetStandardSizeGeneralVisibilities;
    BEGIN
    EnableParameter(PluginHandle,'Height h',false);
    EnableParameter(PluginHandle,'Width b',false);
    EnableParameter(PluginHandle,'Web Thickness s',false);
    EnableParameter(PluginHandle,'Flange Thickness t',false);
    EnableParameter(PluginHandle,'Radius R',false);
    EnableParameter(PluginHandle,'Radius  r',false);
    EnableParameter(PluginHandle,'Diameter D',false);
    END;
    
    
    PROCEDURE SetCustomSizeGeneralVisibilities;
    BEGIN
    EnableParameter(PluginHandle,'I Beam Size',false);
    EnableParameter(PluginHandle,'U Beam Size',false);
    EnableParameter(PluginHandle,'L Beam Size E',false);
    EnableParameter(PluginHandle,'L Beam Size NE',false);
    EnableParameter(PluginHandle,'Sq Beam Size',false);
    EnableParameter(PluginHandle,'Rect Beam Size',false);
    EnableParameter(PluginHandle,'Round Beam Size',false);
    END;
    {---- ---- ---- ---- ---- ---- TYPE SPECIFIC VISIBILITY SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetIBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'I Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    
    PROCEDURE SetUBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'U Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    END;
    
    
    PROCEDURE SetLBeamEqualVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'L Beam Size E',true);
    SetParameterVisibility(PluginHandle,'Profile side LEFT',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    SetParameterVisibility(PluginHandle,'Flip vertically',true);
    END;
    
    
    PROCEDURE SetLBeamNonEqualVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'L Beam Size NE',true);
    SetParameterVisibility(PluginHandle,'Profile side LEFT',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    SetParameterVisibility(PluginHandle,'Flip h and b',true);
    SetParameterVisibility(PluginHandle,'Flip vertically',true);
    
    IF PFlip_h_and_b=true THEN
    	BEGIN
    		TempReal:=BeamHeight;
    		BeamHeight:=BeamWidth;
    		BeamWidth:=TempReal;
    	END;
    END;
    
    
    PROCEDURE SetSquaredBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Sq Beam Size',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    
    PROCEDURE SetRectangularBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Rect Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    PROCEDURE SetRoundBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Round Beam Size',true);
    SetParameterVisibility(PluginHandle,'Diameter D',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    
    PROCEDURE SetAssemblyVisibilities;
    BEGIN
    
    SetParameterVisibility(PluginHandle,'L-Beam on Side',true);
    
    SetParameterVisibility(PluginHandle,'Left LB type',true);
    SetParameterVisibility(PluginHandle,'LLB Size E',true);
    SetParameterVisibility(PluginHandle,'LLB Size NE',true);
    SetParameterVisibility(PluginHandle,'LLB Custom Size',true);
    SetParameterVisibility(PluginHandle,'LLB Height h',true);
    SetParameterVisibility(PluginHandle,'LLB Width b',true);
    SetParameterVisibility(PluginHandle,'LLB Flange t',true);
    SetParameterVisibility(PluginHandle,'LLB Radius R',true);
    SetParameterVisibility(PluginHandle,'LLB Radius  r',true);
    SetParameterVisibility(PluginHandle,'LLB flip h and b',true);
    
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    {---- ---- ---- ---- ---- ---- TEXT LOCATION AND VISIBILITY SPECIFIC SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetTextPositionVisibilitiesAndLocation;
    BEGIN
    IF PFixed_Text_Position=true THEN
    	BEGIN
    		TextX:=BeamLength/2;
    		SetRField(PluginHandle,'3D Steel Beam','ControlPoint01X',Num2Str(0,TextX));
    		EnableParameter(PluginHandle,'ControlPoint01X',false);
    	END;
    END;
    {---- ---- ---- ---- ---- ---- TYPE SPECIFIC STANDARD SIZE SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetIBeamStandardSize;
    BEGIN
    IF PI_Beam_Size='10B1'THEN BEGIN BeamHeight:=100; BeamWidth:=55; WebThickness:=4.1; FlangeThickness:= 5.7; FiletRadius:=7; END;
    IF PI_Beam_Size='16B1'THEN BEGIN BeamHeight:=157; BeamWidth:=82; WebThickness:=4; FlangeThickness:= 5.9; FiletRadius:=9; END;
    END;
    
    
    PROCEDURE SetUBeamStandardSize;
    BEGIN
    IF PU_Beam_Size='5P'THEN BEGIN BeamHeight:=50; BeamWidth:=32; WebThickness:=4.4; FlangeThickness:=7; FiletRadius:=6; FiletRadius2:=3.5; END;
    IF PU_Beam_Size='12P'THEN BEGIN BeamHeight:=120; BeamWidth:=52; WebThickness:=4.8; FlangeThickness:=7.8; FiletRadius:=7.5; FiletRadius2:=4.5; END;
    IF PU_Beam_Size='20P'THEN BEGIN BeamHeight:=200; BeamWidth:=76; WebThickness:=5.2; FlangeThickness:=9; FiletRadius:=9.5; FiletRadius2:=5.5; END;
    END;
    
    
    PROCEDURE SetLBeamEqualStandardSize;
    BEGIN
    SetRField(PluginHandle,'3D Steel Beam','Flip h and b','False');
    IF PL_Beam_size_e='20x3'THEN BEGIN BeamWidth:=20; FlangeThickness:=3; FiletRadius:=3.5; FiletRadius2:=1.2; END;
    IF PL_Beam_size_e='50x4'THEN BEGIN BeamWidth:=50; FlangeThickness:=4; FiletRadius:=5.5; FiletRadius2:=1.8; END;
    IF PL_Beam_size_e='70x7'THEN BEGIN BeamWidth:=70; FlangeThickness:=7; FiletRadius:=8; FiletRadius2:=2.7; END;
    END;
    
    
    PROCEDURE SetLBeamNonEqualStandardSize;
    BEGIN
    IF PL_Beam_size_ne='40x25x3'THEN BEGIN BeamHeight:=40; BeamWidth:=25; FlangeThickness:=3; FiletRadius:=4; FiletRadius2:=1.3; END;
    IF PL_Beam_size_ne='63x40x8'THEN BEGIN BeamHeight:=63; BeamWidth:=40; FlangeThickness:=8; FiletRadius:=7; FiletRadius2:=2.3; END;
    END;
    
    
    PROCEDURE SetSquaredBeamStandardSize;
    BEGIN
    IF PSq_Beam_Size='50x5'THEN BEGIN BeamWidth:=50; WebThickness:=5; FiletRadius:=2.5; END;
    IF PSq_Beam_Size='80x6'THEN BEGIN BeamWidth:=80; WebThickness:=6; FiletRadius:=2.5; END;
    END;
    
    
    PROCEDURE SetRectangularBeamStandardSize;
    BEGIN
    IF PRect_Beam_Size='100x60x6'THEN BEGIN BeamHeight:=100; BeamWidth:=60; WebThickness:=6; END;
    IF PRect_Beam_Size='260x140x12.5'THEN BEGIN BeamHeight:=260; BeamWidth:=140; WebThickness:=12.5; END;
    END;
    
    PROCEDURE SetRoundBeamStandardSize;
    BEGIN
    IF PRound_Beam_Size='76x2.5' THEN BEGIN BeamDiameter:=76; FlangeThickness:=2.5; END;
    IF PRound_Beam_Size='101.6x2.5' THEN BEGIN BeamDiameter:=101.6; FlangeThickness:=2.5; END;
    END;
    
    {---- ---- ---- ---- ---- ---- 2D OBJECT SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE Create2DRectangle;
    BEGIN
    IF PBeam_Type='Round Beam' THEN BeamWidth:=BeamDiameter;
    MoveTo(0,-BeamWidth/2);
    Rect(BeamWidth,#90,BeamLength,#0);
    END;
    
    PROCEDURE CreateLBeam2D;
    BEGIN
    Create2DRectangle;
    IF PFlip_vertically=false THEN
    	BEGIN
    		MoveTo(0,-BeamWidth/2+FlangeThickness);
    		LineTo(BeamLength,-BeamWidth/2+FlangeThickness);
    		IF PProfile_Side_LEFT=true THEN FlipVer;
    	END;
    END;
    
    PROCEDURE DrawLeaderLine;
    BEGIN
    IF PDraw_Leader=true THEN
    	BEGIN
    		MoveTo(TextX, TextY);
    		LineTo(BeamLength/2,0);
    		SetObjArrow(lnewobj,3,0.02,0,false,true);
    	END;
    END;
    
    PROCEDURE CreateTextContainingBeamInfo;
    BEGIN
    IF PDisplay_Item_Info=true THEN
    	BEGIN
    		DrawLeaderLine;
    		IF PBeam_Type='Round Beam' THEN BeamHeight:=BeamDiameter;
    
    		DocumentTextStyle:=GetPrefInt(58);
    		SetPrefInt(58,0);
    
    		TextOrigin(TextX, TextY);
    		CreateText(Concat(ItemNumber,CHR(13),'L-',Num2Str(0,BeamLength),CHR(13),Num2Str(3,(ItemElevation-BeamHeight)/1000)));
    		SetTextSize(lnewobj,0,Len(ItemNumber),15);
    		SetTextStyle(lnewobj,0,Len(ItemNumber),3);
    		SetTextSize(lnewobj,Len(ItemNumber),Len(Num2Str(0,BeamLength))+3,6);
    		SetTextStyle(lnewobj,Len(ItemNumber),Len(Num2Str(0,BeamLength))+3,3);
    		SetTextSize(lnewobj,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4,Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),10);
    		SetTextStyle(lnewobj,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4,Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),7);
    		SetTextFont(lnewobj,0,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4+Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),GetFontID('Bank Gothic'));
    		SetTextLeading(lnewobj,8);
    	{	SetFPat(lnewobj,0);}
    
    		SetPrefInt(58,DocumentTextStyle);
    	END;
    END;
    {---- ---- ---- ---- ---- ---- 3D OBJECT SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE CreateExtrudeProfile;
    BEGIN
    IF PBeam_Type='I-Beam' THEN IBeamProfile(BeamHeight,BeamWidth,WebThickness,FlangeThickness,FiletRadius);
    IF PBeam_Type='U-Beam' THEN UBeamProfile(BeamHeight,BeamWidth,WebThickness,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='L-Beam (equal)' THEN LBeamProfile(BeamWidth,BeamWidth,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='L-Beam (non-equal)' THEN LBeamProfile(BeamHeight,BeamWidth,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='Squared Beam' THEN RectBeamProfile(BeamWidth,BeamWidth,WebThickness);
    IF PBeam_Type='Rectangular Beam' THEN RectBeamProfile(BeamHeight,BeamWidth,WebThickness);
    IF PBeam_Type='Round Beam' THEN RoundBeamProfile(BeamDiameter,FlangeThickness);
    END;
    {---- ---- ---- ---- ---- ---- ASSEMBLY SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE CreateBeamAssembley;
    BEGIN
    
    LeftLBeam:=CreateCustomObjectN('3D Steel Beam',0,-10,0, false);
    SetRField(LeftLBeam,'3D Steel Beam','Display Item Info','false');
    SetRField(LeftLBeam,'3D Steel Beam','Beam Type','L-Beam (equal)');
    SetRField(LeftLBeam,'3D Steel Beam','LineLength',Num2Str(0,BeamLength));
    SetRField(LeftLBeam,'3D Steel Beam','Flip vertically','true');
    SetRField(LeftLBeam,'3D Steel Beam','Profile side LEFT','true');
    Move3DObj(LeftLBeam,0,0, -100);
    
    MainIBeam:=CreateCustomObjectN('3D Steel Beam',0,0, 0, false);
    SetRField(MainIBeam,'3D Steel Beam','Display Item Info','false');
    SetRField(MainIBeam,'3D Steel Beam','Beam Type','I-Beam');
    SetRField(MainIBeam,'3D Steel Beam','LineLength',Num2Str(0,BeamLength));
    
    END;
    {---- ---- ---- ---- ---- ---- PLUG-IN SPECIFIC GENERAL SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetInitialInfo;
    BEGIN
    SetInitialVariables;
    SetInitialParameterVisibility;
    END;
    
    PROCEDURE SetCustomOrStandardSizeGeneralSettings;
    BEGIN
    IF PCustom_Beam=false THEN SetStandardSizeGeneralVisibilities ELSE SetCustomSizeGeneralVisibilities;
    IF PCustom_Beam=false THEN
    BEGIN
    	IF PBeam_Type='I-Beam' THEN SetIBeamStandardSize;
    	IF PBeam_Type='U-Beam' THEN SetUBeamStandardSize;
    	IF PBeam_Type='L-Beam (equal)' THEN SetLBeamEqualStandardSize;
    	IF PBeam_Type='L-Beam (non-equal)' THEN SetLBeamNonEqualStandardSize;
    	IF PBeam_Type='Squared Beam' THEN SetSquaredBeamStandardSize;
    	IF PBeam_Type='Rectangular Beam' THEN SetRectangularBeamStandardSize;
    	IF PBeam_Type='Round Beam' THEN SetRoundBeamStandardSize;
    
    	SetRField(PluginHandle,'3D Steel Beam','Height h',Num2Str(0,BeamHeight));
    	SetRField(PluginHandle,'3D Steel Beam','Width b',Num2Str(0,BeamWidth));
    	SetRField(PluginHandle,'3D Steel Beam','Web Thickness s',Num2Str(1,WebThickness));
    	SetRField(PluginHandle,'3D Steel Beam','Flange Thickness t',Num2Str(1,FlangeThickness));
    	SetRField(PluginHandle,'3D Steel Beam','Radius R',Num2Str(1,FiletRadius));
    	SetRField(PluginHandle,'3D Steel Beam','Radius  r',Num2Str(1,FiletRadius2));
    	SetRField(PluginHandle,'3D Steel Beam','Diameter D',Num2Str(1,BeamDiameter));
    END;
    END;
    
    PROCEDURE SetTypeSpecificVisibilities;
    BEGIN
    IF PBeam_Type='I-Beam' THEN SetIBeamVisibilities;
    IF PBeam_Type='U-Beam' THEN SetUBeamVisibilities;
    IF PBeam_Type='L-Beam (equal)' THEN SetLBeamEqualVisibilities;
    IF PBeam_Type='L-Beam (non-equal)' THEN SetLBeamNonEqualVisibilities;
    IF PBeam_Type='Squared Beam' THEN SetSquaredBeamVisibilities;
    IF PBeam_Type='Rectangular Beam' THEN SetRectangularBeamVisibilities;
    IF PBeam_Type='Round Beam' THEN SetRoundBeamVisibilities;
    IF PBeam_Type='Assembly' THEN SetAssemblyVisibilities;
    END;
    
    
    PROCEDURE Create2DObjects;
    BEGIN
    IF PBeam_Type='I-Beam' THEN Create2DRectangle;
    IF PBeam_Type='U-Beam' THEN Create2DRectangle;
    IF PBeam_Type='L-Beam (equal)' THEN CreateLBeam2D;
    IF PBeam_Type='L-Beam (non-equal)' THEN CreateLBeam2D;
    IF PBeam_Type='Squared Beam' THEN Create2DRectangle;
    IF PBeam_Type='Rectangular Beam' THEN Create2DRectangle;
    IF PBeam_Type='Round Beam' THEN Create2DRectangle;
    CreateTextContainingBeamInfo;
    END;
    
    PROCEDURE CreateExtrude;
    BEGIN
    BeginXtrd(0,BeamLength);
    	CreateExtrudeProfile;
    	IF PProfile_Side_LEFT=true THEN FlipHor;
    	IF PFlip_vertically=true THEN FlipVer;
    EndXtrd;
    ExtrHnd:=LNewObj;
    SET3DRot(ExtrHnd, 90, 0, 90, 0, 0, 0);
    Move3DObj(ExtrHnd,0,0, ItemElevation);
    END;
    {---- ---- ---- ---- ---- ---- ---- ---- ---- ---- MAIN CODE ---- ---- ---- ---- ---- ---- ---- ---- ---- ----}
    BEGIN
    SetInitialInfo;
    SetCustomOrStandardSizeGeneralSettings;
    SetTypeSpecificVisibilities;
    SetTextPositionVisibilitiesAndLocation;
    Create2DObjects;
    IF PBeam_Type='Assembly' THEN CreateBeamAssembley ELSE CreateExtrude;
    END;
    Run(SteelBeam);
    

  15. Does anyone know why my handrails only appear on the lower level stair view and not in the upper level design layer?

    Exactly same problem here on mac with VW Designer 2009 SP5. Any cure?

  16. I have re-worked most of my code. Few more questions.

    1. Is it possible to set text object within my plugin always to be with Fill Style "None"? So that text has it's owns graphic attributes, meantime the rest of plugin 2D objects having plug-in's graphic attributes?

    2. I have a text object and a leader. Leader is drawn from center of text object (just realized I have to fix text justification always to be center h and v, it appeared to be working fine because my default text justification settings were center/center) to midpoint of beam length. How to create an offset so that leader line starts not at center of the text but at the point where would be intersection of leader line as it is now and border of text object? Something like MoveTo(Direction X and Y from current pen position, Distance)? I tried to achieve it by using trigonometry but there obviously is an error. That part in my code is commented out.

    3. How to make a combined beam? For example, I make Combined Beam from I beam and L beam. This Combined beam is labeled SB-7. Meantime in schedule I see data like this:

    Nr._______Type_______________Height h

    SB-7_____Combined Beam_____250

    SB-7.1___I-Beam______________250

    SB-7.2___L-Beam_____________110

    Is it possible to insert plug-in into itself? Guess not... So, should I create separate plugin for combining beams? With what function/procedure do I insert plug-in into another plug-in?

    Here's my code as it is today:

    {3D Steel Beam; V1.4; written by Janis Prodnieks}
    PROCEDURE SteelBeam;
    VAR
    BeamLength, ItemElevation, BeamHeight, BeamWidth, WebThickness, FlangeThickness, FiletRadius, FiletRadius2, BeamDiameter, TempReal :REAL;
    DocumentTextStyle :INTEGER;
    ExtrHnd, PluginHandle, TextHandle :HANDLE;
    ItemNumber, BeamType :STRING;
    {---- ---- ---- ---- ---- ---- PROFILE PROCEDURES ---- ---- ---- ---- ---- ----}
    PROCEDURE IBeamProfile(h,b,s,t,R1 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(b/2,0);
    	AddPoint(b/2,-t);
    	AddPoint(s/2+R1,-t);
    	ArcTo(s/2,-t,R1);
    	AddPoint(s/2,-h+t+R1);
    	ArcTo(s/2,-h+t,R1);
    	AddPoint(b/2,-h+t);
    	AddPoint(b/2,-h);
    	AddPoint(-b/2,-h);
    	AddPoint(-b/2,-h+t);
    	AddPoint(-s/2-R1,-h+t);
    	ArcTo(-s/2,-h+t,R1);
    	AddPoint(-s/2,-t-R1);
    	ArcTo(-s/2,-t,R1);
    	AddPoint(-b/2,-t);
    EndPoly;
    END;
    
    PROCEDURE UBeamProfile(h,b,s,t,R1,r2 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(b/2,0);
    	AddPoint(b/2,-t+r2);
    	ArcTo(b/2,-t,r2);
    	AddPoint(-b/2+s+R1,-t);
    	ArcTo(-b/2+s,-t,R1);
    	AddPoint(-b/2+s,-h+t+R1);
    	ArcTo(-b/2+s,-h+t,R1);
    	AddPoint(b/2-r2,-h+t);
    	ArcTo(b/2,-h+t,r2);
    	AddPoint(b/2,-h+t-r2);
    	AddPoint(b/2,-h);
    	AddPoint(-b/2,-h);
    EndPoly;
    END;
    
    
    PROCEDURE LBeamProfile(h,b,t,R1,r2 : REAL);
    BEGIN
    BeginPoly;
    	AddPoint(-b/2,0);
    	AddPoint(-b/2,-h);
    	AddPoint(b/2,-h);
    	AddPoint(b/2,-h+t-r2);
    	ArcTo(b/2,-h+t,r2);
    	AddPoint(-b/2+t+R1,-h+t);
    	ArcTo(-b/2+t,-h+t,R1);
    	AddPoint(-b/2+t,-r2);
    	ArcTo(-b/2+t,0,r2);
    EndPoly;
    END;
    
    
    PROCEDURE RectBeamProfile(h,b,s: REAL);
    VAR
    OuterPolyH, HolePolyTemplateH: HANDLE;
    R1: REAL;
    BEGIN
    R1:=2.5*s;
    IF s<6 THEN R1:=2*s;
    IF s>10 THEN R1:=3*s;
    BeginPoly;
    	AddPoint(-b/2+R1+s,0);
    	AddPoint(b/2-R1-s,0);
    	ArcTo(b/2,0,R1+s);
    	AddPoint(b/2,-R1-s);
    	AddPoint(b/2,-h+R1+s);
    	ArcTo(b/2,-h,R1+s);
    	AddPoint(b/2-R1-s,-h);
    	AddPoint(-b/2+R1+s,-h);
    	ArcTo(-b/2,-h,R1+s);
    	AddPoint(-b/2,-h+R1+s);
    	AddPoint(-b/2,-R1-s);
    	ArcTo(-b/2,0,R1+s);
    EndPoly;
    OuterPolyH:=LNewObj;
    BeginPoly;
    	AddPoint(-b/2+R1+s,-s);
    	AddPoint(b/2-R1-s,-s);
    	ArcTo(b/2-s,-s,R1);
    	AddPoint(b/2-s,-R1-s);
    	AddPoint(b/2-s,-h+R1+s);
    	ArcTo(b/2-s,-h+s,R1);
    	AddPoint(b/2-R1-s,-h+s);
    	AddPoint(-b/2+R1+s,-h+s);
    	ArcTo(-b/2+s,-h+s,R1);
    	AddPoint(-b/2+s,-h+R1+s);
    	AddPoint(-b/2+s,-R1-s);
    	ArcTo(-b/2+s,-s,R1);
    EndPoly;
    HolePolyTemplateH:=LNewObj;
    IF AddHole(OuterPolyH,HolePolyTemplateH) THEN DelObject (HolePolyTemplateH);
    END;
    
    
    PROCEDURE RoundBeamProfile(D,t: REAL);
    VAR
    OuterPolyH, HolePolyTemplateH: HANDLE;
    BEGIN
    Oval(-D/2,0,D/2,-D);
    OuterPolyH:=LNewObj;
    Oval(-D/2+t,0-t,D/2-t,-D+t);
    HolePolyTemplateH:=LNewObj;
    IF AddHole(OuterPolyH,HolePolyTemplateH) THEN DelObject (HolePolyTemplateH);
    END;
    {---- ---- ---- ---- ---- ---- PLUG-IN SPECIFIC OTHER SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetInitialParameterVisibility;
    BEGIN
    SetParameterVisibility(PluginHandle,'I Beam Size',false);
    SetParameterVisibility(PluginHandle,'U Beam Size',false);
    SetParameterVisibility(PluginHandle,'L Beam Size E',false);
    SetParameterVisibility(PluginHandle,'L Beam Size NE',false);
    SetParameterVisibility(PluginHandle,'Sq Beam Size',false);
    SetParameterVisibility(PluginHandle,'Rect Beam Size',false);
    SetParameterVisibility(PluginHandle,'Round Beam Size',false);
    SetParameterVisibility(PluginHandle,'Height h',false);
    SetParameterVisibility(PluginHandle,'Width b',false);
    SetParameterVisibility(PluginHandle,'Web Thickness s',false);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',false);
    SetParameterVisibility(PluginHandle,'Radius R',false);
    SetParameterVisibility(PluginHandle,'Radius  r',false);
    SetParameterVisibility(PluginHandle,'Diameter D',false);
    SetParameterVisibility(PluginHandle,'Flip h and b',false);
    END;
    
    
    PROCEDURE SetInitialVariables;
    BEGIN
    ClosePoly;
    
    PluginHandle:=FSactLayer;
    ItemNumber:= PNumber;
    
    BeamLength:= PLineLength;
    ItemElevation:= PTop_Elevation;
    BeamHeight:= PHeight_h;
    BeamWidth:= PWidth_b;
    WebThickness:= PWeb_Thickness_s;
    FlangeThickness:= PFlange_Thickness_t;
    FiletRadius:= PRadius_R;
    FiletRadius2:= PRadius__r;
    BeamDiameter:=PDiameter_D;
    END;
    
    
    PROCEDURE SetStandardSizeGeneralVisibilities;
    BEGIN
    EnableParameter(PluginHandle,'Height h',false);
    EnableParameter(PluginHandle,'Width b',false);
    EnableParameter(PluginHandle,'Web Thickness s',false);
    EnableParameter(PluginHandle,'Flange Thickness t',false);
    EnableParameter(PluginHandle,'Radius R',false);
    EnableParameter(PluginHandle,'Radius  r',false);
    EnableParameter(PluginHandle,'Diameter D',false);
    END;
    
    
    PROCEDURE SetCustomSizeGeneralVisibilities;
    BEGIN
    EnableParameter(PluginHandle,'I Beam Size',false);
    EnableParameter(PluginHandle,'U Beam Size',false);
    EnableParameter(PluginHandle,'L Beam Size E',false);
    EnableParameter(PluginHandle,'L Beam Size NE',false);
    EnableParameter(PluginHandle,'Sq Beam Size',false);
    EnableParameter(PluginHandle,'Rect Beam Size',false);
    EnableParameter(PluginHandle,'Round Beam Size',false);
    END;
    {---- ---- ---- ---- ---- ---- TYPE SPECIFIC VISIBILITY SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetIBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'I Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    
    PROCEDURE SetUBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'U Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    END;
    
    
    PROCEDURE SetLBeamEqualVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'L Beam Size E',true);
    SetParameterVisibility(PluginHandle,'Profile side LEFT',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    END;
    
    
    PROCEDURE SetLBeamNonEqualVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'L Beam Size NE',true);
    SetParameterVisibility(PluginHandle,'Profile side LEFT',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    SetParameterVisibility(PluginHandle,'Radius R',true);
    SetParameterVisibility(PluginHandle,'Radius  r',true);
    SetParameterVisibility(PluginHandle,'Flip h and b',true);
    END;
    
    
    PROCEDURE SetSquaredBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Sq Beam Size',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    
    PROCEDURE SetRectangularBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Rect Beam Size',true);
    SetParameterVisibility(PluginHandle,'Height h',true);
    SetParameterVisibility(PluginHandle,'Width b',true);
    SetParameterVisibility(PluginHandle,'Web Thickness s',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    PROCEDURE SetRoundBeamVisibilities;
    BEGIN
    SetParameterVisibility(PluginHandle,'Round Beam Size',true);
    SetParameterVisibility(PluginHandle,'Diameter D',true);
    SetParameterVisibility(PluginHandle,'Flange Thickness t',true);
    EnableParameter(PluginHandle,'Profile side LEFT',false);
    END;
    
    {---- ---- ---- ---- ---- ---- TYPE SPECIFIC STANDARD SIZE SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetIBeamStandardSize;
    BEGIN
    IF PI_Beam_Size='10B1'THEN BEGIN BeamHeight:=100; BeamWidth:=55; WebThickness:=4.1; FlangeThickness:= 5.7; FiletRadius:=7; END;
    IF PI_Beam_Size='16B1'THEN BEGIN BeamHeight:=157; BeamWidth:=82; WebThickness:=4; FlangeThickness:= 5.9; FiletRadius:=9; END;
    END;
    
    
    PROCEDURE SetUBeamStandardSize;
    BEGIN
    IF PU_Beam_Size='5P'THEN BEGIN BeamHeight:=50; BeamWidth:=32; WebThickness:=4.4; FlangeThickness:=7; FiletRadius:=6; FiletRadius2:=3.5; END;
    IF PU_Beam_Size='12P'THEN BEGIN BeamHeight:=120; BeamWidth:=52; WebThickness:=4.8; FlangeThickness:=7.8; FiletRadius:=7.5; FiletRadius2:=4.5; END;
    IF PU_Beam_Size='20P'THEN BEGIN BeamHeight:=200; BeamWidth:=76; WebThickness:=5.2; FlangeThickness:=9; FiletRadius:=9.5; FiletRadius2:=5.5; END;
    END;
    
    
    PROCEDURE SetLBeamEqualStandardSize;
    BEGIN
    IF PL_Beam_size_e='20x3'THEN BEGIN BeamWidth:=20; FlangeThickness:=3; FiletRadius:=3.5; FiletRadius2:=1.2; END;
    IF PL_Beam_size_e='50x4'THEN BEGIN BeamWidth:=50; FlangeThickness:=4; FiletRadius:=5.5; FiletRadius2:=1.8; END;
    IF PL_Beam_size_e='70x7'THEN BEGIN BeamWidth:=70; FlangeThickness:=7; FiletRadius:=8; FiletRadius2:=2.7; END;
    END;
    
    
    PROCEDURE SetLBeamNonEqualStandardSize;
    BEGIN
    IF PL_Beam_size_ne='40x25x3'THEN BEGIN BeamHeight:=40; BeamWidth:=25; FlangeThickness:=3; FiletRadius:=4; FiletRadius2:=1.3; END;
    IF PL_Beam_size_ne='63x40x8'THEN BEGIN BeamHeight:=63; BeamWidth:=40; FlangeThickness:=8; FiletRadius:=7; FiletRadius2:=2.3; END;
    END;
    
    
    PROCEDURE SetSquaredBeamStandardSize;
    BEGIN
    IF PSq_Beam_Size='50x5'THEN BEGIN BeamWidth:=50; WebThickness:=5; FiletRadius:=2.5; END;
    IF PSq_Beam_Size='80x6'THEN BEGIN BeamWidth:=80; WebThickness:=6; FiletRadius:=2.5; END;
    END;
    
    
    PROCEDURE SetRectangularBeamStandardSize;
    BEGIN
    IF PRect_Beam_Size='100x60x6'THEN BEGIN BeamHeight:=100; BeamWidth:=60; WebThickness:=6; END;
    IF PRect_Beam_Size='260x140x12.5'THEN BEGIN BeamHeight:=260; BeamWidth:=140; WebThickness:=12.5; END;
    END;
    
    PROCEDURE SetRoundBeamStandardSize;
    BEGIN
    IF PRound_Beam_Size='76x2.5' THEN BEGIN BeamDiameter:=76; FlangeThickness:=2.5; END;
    IF PRound_Beam_Size='101.6x2.5' THEN BEGIN BeamDiameter:=101.6; FlangeThickness:=2.5; END;
    END;
    
    {---- ---- ---- ---- ---- ---- 2D OBJECT SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE Create2DRectangle;
    BEGIN
    IF PBeam_Type='Round Beam' THEN BeamWidth:=BeamDiameter;
    MoveTo(0,-BeamWidth/2);
    Rect(BeamWidth,#90,BeamLength,#0);
    END;
    
    PROCEDURE Create2DRectangleWithLine;
    BEGIN
    IF PFlip_h_and_b=true THEN
    	BEGIN
    		TempReal:=BeamHeight;
    		BeamHeight:=BeamWidth;
    		BeamWidth:=TempReal;
    	END;
    Create2DRectangle;
    MoveTo(0,-BeamWidth/2+FlangeThickness);
    LineTo(BeamLength,-BeamWidth/2+FlangeThickness);
    IF PProfile_Side_LEFT=true THEN FlipVer;
    END;
    
    PROCEDURE CreateTextContainingBeamInfo;
    
    BEGIN
    IF PBeam_Type='Round Beam' THEN BeamHeight:=BeamDiameter;
    IF PControlPoint01X=0 THEN
    	BEGIN
    		SetRField(PluginHandle,'3D Steel Beam','ControlPoint01X','1500');
    	END;
    
    DocumentTextStyle:=GetPrefInt(58);
    
    SetPrefInt(58,0);
    
    
    TextOrigin(PControlPoint01X, PControlPoint01Y);
    CreateText(Concat(ItemNumber,CHR(13),'L-',Num2Str(0,BeamLength),CHR(13),Num2Str(3,(ItemElevation-BeamHeight)/1000)));
    TextHandle:=lnewobj;
    SetTextSize(lnewobj,0,Len(ItemNumber),15);
    SetTextStyle(lnewobj,0,Len(ItemNumber),3);
    SetTextSize(lnewobj,Len(ItemNumber),Len(Num2Str(0,BeamLength))+3,6);
    SetTextStyle(lnewobj,Len(ItemNumber),Len(Num2Str(0,BeamLength))+3,3);
    SetTextSize(lnewobj,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4,Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),10);
    SetTextStyle(lnewobj,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4,Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),7);
    SetTextFont(lnewobj,0,Len(ItemNumber)+Len(Num2Str(0,BeamLength))+4+Len(Num2Str(3,(ItemElevation-BeamHeight)/1000)),GetFontID('Bank Gothic'));
    SetTextLeading(lnewobj,8);
    {SetVectorFill(TextHandle,'None');}
    
    SetPrefInt(58,DocumentTextStyle);
    END;
    
    
    PROCEDURE DrawLeaderLine;
    VAR
    a,b,c, Angle: REAL;
    BEGIN
    IF PDraw_Leader=true THEN
    	BEGIN
    		MoveTo(PControlPoint01X, PControlPoint01Y);
    		LineTo(BeamLength/2,0);
    		SetObjArrow(lnewobj,3,0.02,0,false,true);
    
    		{c:=Sqrt(sqr(PControlPoint01X-BeamLength/2)+sqr(PControlPoint01Y));
    		Angle:=ArcSin(PControlPoint01Y/c);
    		c:=c-1000;
    		b:=Sin(Angle)*c;
    		a:=ArcCos((PControlPoint01Y+BeamLength/2)/c);}
    
    		{Angle:=-Rad2Deg(ArcSin(PControlPoint01Y/Sqrt(sqr(PControlPoint01X-BeamLength/2)+sqr(PControlPoint01Y))));
    		MoveTo(PControlPoint01X, PControlPoint01Y);
    		AngleVar;
    		MoveTo(1000, #Angle);
    		Absolute;}
    	END;
    END;
    {---- ---- ---- ---- ---- ---- 3D OBJECT SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE CreateExtrudeProfile;
    BEGIN
    IF PBeam_Type='I-Beam' THEN IBeamProfile(BeamHeight,BeamWidth,WebThickness,FlangeThickness,FiletRadius);
    IF PBeam_Type='U-Beam' THEN UBeamProfile(BeamHeight,BeamWidth,WebThickness,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='L-Beam (equal)' THEN LBeamProfile(BeamWidth,BeamWidth,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='L-Beam (non-equal)' THEN LBeamProfile(BeamHeight,BeamWidth,FlangeThickness,FiletRadius,FiletRadius2);
    IF PBeam_Type='Squared Beam' THEN RectBeamProfile(BeamWidth,BeamWidth,WebThickness);
    IF PBeam_Type='Rectangular Beam' THEN RectBeamProfile(BeamHeight,BeamWidth,WebThickness);
    IF PBeam_Type='Round Beam' THEN RoundBeamProfile(BeamDiameter,FlangeThickness);
    END;
    {---- ---- ---- ---- ---- ---- PLUG-IN SPECIFIC GENERAL SUBS ---- ---- ---- ---- ---- ----}
    PROCEDURE SetInitialInfo;
    BEGIN
    SetInitialVariables;
    SetInitialParameterVisibility;
    END;
    
    PROCEDURE SetCustomOrStandardSizeGeneralSettings;
    BEGIN
    IF PCustom_Beam=false THEN SetStandardSizeGeneralVisibilities ELSE SetCustomSizeGeneralVisibilities;
    IF PCustom_Beam=false THEN
    BEGIN
    	IF PBeam_Type='I-Beam' THEN SetIBeamStandardSize;
    	IF PBeam_Type='U-Beam' THEN SetUBeamStandardSize;
    	IF PBeam_Type='L-Beam (equal)' THEN SetLBeamEqualStandardSize;
    	IF PBeam_Type='L-Beam (non-equal)' THEN SetLBeamNonEqualStandardSize;
    	IF PBeam_Type='Squared Beam' THEN SetSquaredBeamStandardSize;
    	IF PBeam_Type='Rectangular Beam' THEN SetRectangularBeamStandardSize;
    	IF PBeam_Type='Round Beam' THEN SetRoundBeamStandardSize;
    
    	SetRField(PluginHandle,'3D Steel Beam','Height h',Num2Str(0,BeamHeight));
    	SetRField(PluginHandle,'3D Steel Beam','Width b',Num2Str(0,BeamWidth));
    	SetRField(PluginHandle,'3D Steel Beam','Web Thickness s',Num2Str(1,WebThickness));
    	SetRField(PluginHandle,'3D Steel Beam','Flange Thickness t',Num2Str(1,FlangeThickness));
    	SetRField(PluginHandle,'3D Steel Beam','Radius R',Num2Str(1,FiletRadius));
    	SetRField(PluginHandle,'3D Steel Beam','Radius  r',Num2Str(1,FiletRadius2));
    	SetRField(PluginHandle,'3D Steel Beam','Diameter D',Num2Str(1,BeamDiameter));
    END;
    END;
    
    PROCEDURE SetTypeSpecificVisibilities;
    BEGIN
    IF PBeam_Type='I-Beam' THEN SetIBeamVisibilities;
    IF PBeam_Type='U-Beam' THEN SetUBeamVisibilities;
    IF PBeam_Type='L-Beam (equal)' THEN SetLBeamEqualVisibilities;
    IF PBeam_Type='L-Beam (non-equal)' THEN SetLBeamNonEqualVisibilities;
    IF PBeam_Type='Squared Beam' THEN SetSquaredBeamVisibilities;
    IF PBeam_Type='Rectangular Beam' THEN SetRectangularBeamVisibilities;
    IF PBeam_Type='Round Beam' THEN SetRoundBeamVisibilities;
    END;
    
    PROCEDURE Create2DObjects;
    BEGIN
    IF PBeam_Type='I-Beam' THEN Create2DRectangle;
    IF PBeam_Type='U-Beam' THEN Create2DRectangle;
    IF PBeam_Type='L-Beam (equal)' THEN Create2DRectangleWithLine;
    IF PBeam_Type='L-Beam (non-equal)' THEN Create2DRectangleWithLine;
    IF PBeam_Type='Squared Beam' THEN Create2DRectangle;
    IF PBeam_Type='Rectangular Beam' THEN Create2DRectangle;
    IF PBeam_Type='Round Beam' THEN Create2DRectangle;
    CreateTextContainingBeamInfo;
    DrawLeaderLine;
    END;
    
    PROCEDURE CreateExtrude;
    BEGIN
    BeginXtrd(0,BeamLength);
    	CreateExtrudeProfile;
    	IF PProfile_Side_LEFT=true THEN FlipHor;
    EndXtrd;
    ExtrHnd:=LNewObj;
    SET3DRot(ExtrHnd, 90, 0, 90, 0, 0, 0);
    Move3DObj(ExtrHnd,0,0, ItemElevation);
    END;
    {---- ---- ---- ---- ---- ---- ---- ---- ---- ---- MAIN CODE ---- ---- ---- ---- ---- ---- ---- ---- ---- ----}
    BEGIN
    SetInitialInfo;
    SetCustomOrStandardSizeGeneralSettings;
    SetTypeSpecificVisibilities;
    Create2DObjects;
    CreateExtrude;
    END;
    Run(SteelBeam);
    

  17. 1. PParameterName is like a constant. You can only assign its value to a variable. Why would you need something in parenthesis?

    For having it look as I want in OIP. For same reason I tried to name a Parameter "I-Beam Size" and failed because of "-" sign within parameter name. Is there a possibility to have ()- or probably other special symbols in parameters name?

    2. The control point is set initially at the origin. You can test for x = 0 & y = 0 and if true then relocate to the midpoint.

    Thx, this works. Haven't polished yet just tested.

    4. The delay may be caused by the code itself if certain operations regenerates the object more than once. By using the debugger you can tell how many times the code is executed.

    I changed the order how information is changed between variables and parameters and it works. The trick was to set value to variable and then pass it to parameter in case of standard size.

    I have couple new questions.

    5. What's a common manner (if there is any) of getting reasonable tool icons?

    6. Parameter names. I have a pop-up parameter which determines type of beam. Then, based on type chosen, the standard sizes are displayed for that type only. I'd love to name that parameter "Size" but I don't see an option to get varying Standard Sizes for different types. So, the only option would be go like "I Beam Size", "U Beam Size" and so on?

    7. The sweetest one :)

    I'm going to make some combined beams which would typically consist from I beam and 1 or 2 L beams (attached to web of I beam). Besides, L beams with exact same parameters are going to be also single beams. Any ideas on this? Subroutine for L beams which is going to be called as necessary?

    I attach my current version of plug-in.

  18. I haven't made a sample drawing yet. Instead I've been coding for most of the day. Some questions regarding VS:

    1. Parenthesis in the name of Parameter doesn't allow to retrieve parameters value with MyVariable:=PParameter_Name_(TextInParenthesis); or otherwise. Is there an option at all to use Parameter Names with parenthesis in it's name?

    ReText Placement

    x:=plinelength/2;

    2. Text with control point. Is it possible to set control point x:=plinelength/2 only when plug-in is inserted first time? And later let the user change it? Or may by it is possible make the button called "center label" which would make x:=plinelength/2?

    3. Is it possible to manage overall code in subroutines without any variables which are passed to/from subroutine?

    4. I'm trying to make standard sizes with possibility to make custom sizes. Currently changing standard sizes reflects with 1 click in OIP delay on 3D geometry. In the attachment is my plug-in in current stage. If you see anything else worth to advise, please go ahead.

  19. The other possibility is to use a combination of symbols and PIOs.

    Create the PIO you want and place it in a symbol. Use the Link Text To Record to place the name of the beam with the symbol.

    Then if you edit the symbol, all of the instances change.

    Definitely some details to work out, but it should be doable.

    I've been doing even symbol with Text linked to record which is then placed again in other symbol. This second symbol is just in order to ensure the name of inserted symbol's instance isn't changed accidentally.

    Main reasons (or some details to be worked out) why I find symbol approach not suitable and PIO approach more suitable are:

    1. If text is linked to record within symbol it's location can't be adjusted for specific symbol instance (in AutoCAD attributes or movable text as part of dynamic block would do the trick).

    2. If it is symbol the Z value isn't automatic as it is with custom made plug-in.

    Am I wrong at some point?

    Thx for your input anyway!

  20. Therefore pure plug-in usage here is an almost definite no-no.

    Update: just finished conversation with my colleague and we agreed that this no-no is a yes-yes.

    Because height information written manually is bigger source of possible errors and causes more headache than possibly varying parameters.

    So forget my 2 long explanations and I'll come back with VS questions when I have them.

  21. um long explanation I don't understand.

    um... my apologies. I'll try to make it short. The long story was about overall logics of the task. On VS part you both have been very supportive. Many thanks for that!

    The overall process. Architectural design of project is done. Structural components are next to do. They are counted and labeled by types. Steel Beam with certain profile and length parameters is named SB-1. Steel Beam with same profile parameters but different length would have different label. I place it (SB-1) in my drawings as needed. Many times. Say, totally 107 instances. Besides each beam (or group of similar beams) I place label and a number which represents bottom Z value if that beam. Then I create detailing drawing and structural section drawings. Finally I create schedule with Label, Count, Parameters of that specific type of beams.

    The problem No1 with plug-ins. Architectural design of project changes. The beams SB-1 now are 1 meter longer. I have to manage parameters of 107 plug-in instances labeled SB-1 being same.

    The problem No2 with plug-ins. If I place 107 instances of plug-in who must have exactly same parameters of profile & length there's a possibility that a plug-in with label SB-1 has different profile or length parameter than others. There will always be a question if all SB-1 beams are really same. Therefore pure plug-in usage here is an almost definite no-no.

    This isn't very short again but take it as it is. Obviously these logic issues can't be described much shorter (Or I'm bad with expressing myself shortly). I think the issue about workflow I'm looking for being out of scope of capabilities of VW as a software package. In AutoCAD there are such a thing as fields which allow to display insertion information of specific block (in VW language - symbol) instance within that block and also dynamic blocks (in VW would be symbols with adjustable parameters, very close to plug-ins). This concept would allow to make it in my case.

    The only workaround I see is to create different plug-in for different type of beams. That would solve issue about same label beams to be with same parameters. But that would create another issue of having many different plug-ins which are built to use only for 1 project. And scheduling info would require creating common Record Format which would be used with all plug-ins as second Record Format, so the Plug-in would require making records to that one common name record format which is something I'm currently not able to do with VS.

    Thank you once again Miguel and Assembly for your assistance with VS! I've answered myself quite much about solution I'm looking for, while was writing these long explanations. Meantime, I see very good usage possibilities for such type of plug-ins in other parts of my workflow (slab panels).

  22. Thx, gents! It's fun to look at it and see it working! Round 1 is complete successfully. That one missing semicolon would have caused much of trouble, since I was checking the line 5 and following lines. Good reason to learn scripting with text editor (I installed Text Wrangler). Round 2 would be getting clear with general workflow I'm after (in order to make sure if this direction is the right one at all) and Round 3 would be polishing things.

    The workflow I'm looking for is:

    1. Create 3D item (custom steel beam) with fixed parameters (such as profile type and profile parameters, overall length). That's what symbols are for.

    2. Place this 3D item in my drawing - set X, Y, Z, rotation and Text placement in plan view (done with Control Point). In Text is displayed bottom Z of specific instance, which is "Layer Z + Instance Z on that Layer". This could be reduced to having beam Layers with Z=0 and placing those beam items in appropriate height. My current plug-in does that.

    3. Create worksheet with DB row showing my custom beams. Necessary columns are Beam Number, Parameters (currently the only one is length, in reality would be much more) and total number of those beams in my DLs.

    With my current understanding this is out of scope of what VW can handle. Creating my custom item which is going to be used repeatedly (and definitely modified many times over it's life-time) normally means creating a symbol. Having different values within text (Z) and location of the same text means creating plug-in object. Meantime having it as full plug-in leaves a major error source in same name beams being with varying parameters. Does VW allow creating Symbol/plug-in hybrid with such conditions? Is it possible to have text changing depending on symbol insertion data if plug-in is a part of symbol? Do others see other options?

    I thought about creating different plug-in for each beam. But what about making new project where beam numbers will be reset and beam types are going to be totally different? And how to get those many different plug-ins into 1 DB row in worksheet? I attach both, plug-in and VW file with situation I'm talking about (error possibility when plug-ins only are used). What else is confusing, the current plug-in reacts on changes in both - Z value and Height fields. Is it possible to have only one of them and keep the text being linked to beams actual height?

    And for Round 3 the only question today is how to get text controlpoint's initial value to be half of LineLength?

×
×
  • Create New...