Jump to content

CodeGier

Member
  • Posts

    21
  • Joined

  • Last visited

Posts posted by CodeGier

  1. Found a solution in the VectorScript mailing list. Thanks to Bill Wood:

    function checkstatus : BOOLEAN;

    Var

    objty : INTEGER;

    btest : BOOLEAN;

    begin

    locus(0,0);

    objty := gettype(getparent(Lnewobj));

    delobject(Lnewobj);

    btest := (objty = 31); {Layer}

    if NOT btest then alrtdialog('Exit current editing mode first');

    checkstatus := btest;

    end;

  2. "convert to lines" does not work in PIOs. I recommend to use an Auto-hybrid. In the attached Record do:

    Set Field(tempHandle,'Auto Hybrid','display','2D');

    So the Auto-Hybrid is only shown in 2D-view. This did the trick in my case.

    Bye

    CodeGier

  3. Hello,

    I am having the following issue (VW 2014 SP4):

    When editing the path of an extrude-along-path object, the lines of the whole drawing are shown greyed (see attached screenshot).

    When editing the path of my 3D-Path-PIO only the path is shown. It's hard using the PIO because you don't see the rest of the drawing when editing the path.

    I tested with this small sample code, and theres the issue too. Tried different projections (2D or 3D, Requires 2D, Requires 3D) but it didn't help. What am I missing?

    PROCEDURE Test3DPath;

    VAR

    objName : STRING;

    pathHd, objHd, objrecHd, wHd : HANDLE;

    Procedure DrawTheTest(aPath : Handle);

    VAR

    i : integer;

    aV : Vector;

    Begin

    for i := 1 to GetVertNum(aPath) do

    begin

    GetPolyPt3D(aPath, i-1, aV.x, aV.y, aV.z);

    Locus3D(aV.x, aV.y, aV.z);

    end;

    End;

    Procedure DrawTest3DPath;

    VAR

    result : BOOLEAN;

    BEGIN

    result:= GetCustomObjectInfo(objName,objHd,objrecHd,wHd);

    IF result THEN BEGIN

    pathHd:= GetCustomObjectPath(objHd);

    IF pathHd <> NIL THEN BEGIN

    DrawTheTest(pathHd);

    END

    ELSE AlrtDialog('Error');

    END;

    End;

    BEGIN

    SetPref(407,TRUE);

    DrawTest3DPath;

    END;

    Run(Test3DPath);

  4. I am using VW 2014 german version. For scripting it would be much easier to have an english version. The translations of menu-commands etc. are not alway enlighting.

    Is a demo version available (without time restriction, no saving, no printing) where I can have a peek at the english commands? I only found a download for a 30 days Trial.

    With my installation DVD I can install a German Demo, but english?

    CodeGier

  5. hello,

    my path-PIO throws errors when double-clicking it and editing the path. The error is thrown in the part of the code where the profile of the PIO is set:

    PROCEDURE SetProfile(aObjHand : HANDLE);

    VAR

    Ergebnis : Boolean;

    aHand : HANDLE;

    BEGIN

    Symbol(mySymbolName,0,0,0);

    aHand := LNewObj;

    Ergebnis := SetCustomObjectProfileGroup(aObjHand, aHand);

    IF not Ergebnis THEN AlrtDialog('Not able to set profile!');

    END;

    Is it possible to check if in edit mode to avoid setting the profile in this case?

    CodeGier

  6. OK, answering it myself. Should have done "Export Text" to have a look at it. Silly me ;-) :

    procedure CreateAutoHybrid(aHandle: Handle);

    var

    tempHandle : Handle;

    boolResult : Boolean;

    begin

    tempHandle := CreateCustomObject('Auto Hybrid',0.000000000000000,0.000000000000000,#0.0000000000000d);

    boolResult := SetCustomObjectProfileGroup(tempHandle, aHandle);

    if boolResult then

    begin

    Record(tempHandle,'Auto Hybrid');

    Field(tempHandle,'Auto Hybrid','display','2DAnd3D');

    Field(tempHandle,'Auto Hybrid','cutPlaneElevation','1500');

    Field(tempHandle,'Auto Hybrid','cutPlaneBase','layerElevation');

    Field(tempHandle,'Auto Hybrid','displayCutPlane','Wahr');

    Field(tempHandle,'Auto Hybrid','cutPlaneClass','');

    Field(tempHandle,'Auto Hybrid','cutPlaneFill','useClass2DAttributes');

    Field(tempHandle,'Auto Hybrid','cutPlanePen','useClass2DAttributes');

    Field(tempHandle,'Auto Hybrid','displayExtentsBelowCutPlane','Wahr');

    Field(tempHandle,'Auto Hybrid','belowCutPlaneRange','infinite');

    Field(tempHandle,'Auto Hybrid','belowCutPlaneFiniteDepth','4000');

    Field(tempHandle,'Auto Hybrid','belowCutPlaneClass','');

    Field(tempHandle,'Auto Hybrid','belowCutPlaneFill','use2DAttributesOfContainedObjects');

    Field(tempHandle,'Auto Hybrid','belowCutPlanePen','use2DAttributesOfContainedObjects');

    Field(tempHandle,'Auto Hybrid','displayExtentsAboveCutPlane','Falsch');

    Field(tempHandle,'Auto Hybrid','aboveCutPlaneRange','infinite');

    Field(tempHandle,'Auto Hybrid','aboveCutPlaneFiniteHeight','4000');

    Field(tempHandle,'Auto Hybrid','aboveCutPlaneClass','');

    Field(tempHandle,'Auto Hybrid','aboveCutPlaneFill','none');

    Field(tempHandle,'Auto Hybrid','aboveCutPlanePen','use2DAttributesOfContainedObjects');

    Field(tempHandle,'Auto Hybrid','showAsReflectedCeilingPlan','Falsch');

    Field(tempHandle,'Auto Hybrid','3DConversionResolution','high');

    Field(tempHandle,'Auto Hybrid','bcpDashedHiddenLine','Falsch');

    Field(tempHandle,'Auto Hybrid','acpDashedHiddenLine','Falsch');

    Field(tempHandle,'Auto Hybrid','smoothingAngle','1');

    Field(tempHandle,'Auto Hybrid','generateIntersectingLines','Wahr');

    Field(tempHandle,'Auto Hybrid','shadeFactorIndex','2');

    end;

    end;

  7. Hello,

    is there a possibility to save the Batch Rendering path in the vwx? Would be a nice feature. It's very boring to change this path every time I am rendering.

    Thank's for answering.

    CodeGier

  8. Hello,

    I am working on the 2D look of a 3D path PIO using this function to convert a Nurbs into a polyline:

    FUNCTION Nurbs2Poly(aPathHD : HANDLE; aPos : REAL) : HANDLE;

    VAR

    h : Handle;

    BEGIN

    h := CreateOffsetNurbsObjectHandle(aPathHD, aPos);

    Nurbs2Poly := MakePolyline(h);

    DelObject(h);

    END;

    It works, but in VW2012 the polyline is closed. I do need an open one! Same behaviour with MakePoly the polygon is closed too.

    I tried to use OpenPoly with my code, but it didn't work either.

    Any idea how I get an open polyline (or polygon) out of my code?

    Thanks in advance.

    Josef

  9. Hello,

    using

    FUNCTION CreateTextureBitmapN ( shaderRecord:HANDLE ) :HANDLE ;

    gives me a Handle to a bitmap created with an upcoming dialog to choose the image file.

    Is there a way to do this without a dialog?

    I need a handle to a TextureBitmap created from a jpg or png file and do not find anything matching in the Function Reference.

    Thanks in advance.

    Josef

  10. It's folding whole procedures:

    procedure myProc;

    const

    myConst = 0;

    var

    myVar : integer;

    Begin

    End;

    Will be folded to:

    procedure myProc; ...

    The Keywords are imported from a textfile. You can feel free and edit it for your own convenience.

    By the way: I am hoping for a better integrated editor since VW11. Would be fatefull if the next version had a better one when I invested the work in my own ;-)

    Bye

    Josef

  11. Hello Windows users,

    For a current project I need to code on a Windows machine. As there seems to be a lack of available editors I decided to write my own.

    The main features are:

    Syntax colouring

    Code folding

    Code completion (on pressing ctrl-space)

    Showing available parameters when typing open bracket

    Exporting coloured code to HTML for posting in forums

    As it took me much more work to comlete the editor as I originally wanted I decided to share it with the VectorScript-community. To say "give the community something back.".

    If anyone here needs a Windows editor I will finish it to a state that anyone could work with it. If not then I will save my time.

    Please state the need here in the forum.

    Bye

    Josef

  12. Hello,

    my 3D-Path-PIO needs different drawing in plain 2D-View.

    ActProjection := GetProjection(ActLayer);

    pathHd:= GetCustomObjectPath(objHd);

    IF pathHd <> NIL THEN BEGIN

    IF ActProjection = 6 THEN DrawPIO2D(pathHd)

    ELSE DrawPIO3D(pathHd);

    END;

    The problem: There is no redraw fired, when changing the views. So it draws not correct.

    Is it possible, to have a redraw of a PIO every time user changes the View?

    Josef

×
×
  • Create New...