Jump to content

Musisback

Member
  • Posts

    154
  • Joined

  • Last visited

Posts posted by Musisback

  1. I'd like to get the name of the texture of a class. The function GetClTextureG return the index of the texture but I cannot find the name from that index.

    Is there a such function that converts a index to a name. Or a function that return directly the texture as a string?

    Thanks,

  2. I am trying to create a procedure that uses 'P: Procedure' as parameter like in the build-in procedures "ForEachObject(callback :PROCEDURE; c :CRITERIA)" or

    PROCEDURE TrackObject(

    callback :PROCEDURE;

    VAR outObj :HANDLE;

    VAR p :REAL);

    The compiler does not recognize the Procedure variable type.

    Do I do something wrong?

    Or is writing such procedure impossible?

    Thanks,

  3. Hello,

    I am wondering if there is any practical places or ways to share user made functions and procedures.

    I would be great to have a "Open function reference guide" ' Does it already exist?

    I actually loose lots of time creating "Not build-in functions" that I can potentially use in all my scripts or PIO's. Most of these functions have certainly been already written by members of this forum.

    It goes all the way from very short ones like

    RealMod( Number : real ; diviseur : longint): real; or

    bool2str(Bool : Boolean):String;

    to more complex ones like

    Local2generalCoordonates(LocalPointInPIO : vector ; ObjPos: vector; objAng : real):vector;

    or

    Circles2Pts(P1,P2 : VECTOR ; R : real ; VAR Center1,Center2 : VECTOR ; VAR Tan1Arc1,Tan2Arc1,Tan1Arc2,Tan2Arc2 : real) : Boolean;

    Well any functions that I didn't find in the Function reference guide and that I had to write myself.

    I know there is a lot of 'examples' everywhere in the forum and the FRG that can be used or transformed into usable functions, but when we need a function, and it doesn't not exist in the function reference guide we usally don't have time to search all the documentation for an tip or a usefull piece of code. So, we just write it ourself if able to. What a wast of time !!

  4. For path PIO's, the different verticles are recognize with there index.

    I think also that the other sub-objects are recognized by there stacking order. (starting of front);

    After lots of trouble not understanding it. I finally got why sometimes the same PIO would keep its dimension associated and why sometimes not : it was because the number of sub-object changed. (and then the stacking order)

    I also noticed that it does not work with rectangle POI's and only on the 2 points defining the line for line PIO's. It works fine for path and point PIO's.

    Why that?? No idea.

  5. Hello,

    I use PIO's that are modified by external scripts.

    It works fine except for the associated dimensions.

    Those do not update when the PIO does if it is modified by an external script.

    However, if I modify it myself (with the Object info palette) it works normally.

    Here is a example to make it clearer.

    My PIO:

    PROCEDURE Myrect;
    BEGIN;
    rect(0,0,PW,PH);
    END;
    run(Myrect);

    If I add dimensions to a corner to another and if modify the PIO with the object info palette, the dimensions update.

    If I modify it with a script:

    setrfield(LSActLayer,getname(getrecord(LSActLayer,1)),'W', '300');	
    setrfield(LSActLayer,getname(getrecord(LSActLayer,1)),'H', '300');	
    resetobject(LSactlayer);

    they do not update...

    Does anyone know how to avoid this problem?

    Thanks

  6. Maarten,

    When I 'Add solids' all the nurbs together, I get a solid that I can use to subtract. I works just fine when I do it with the menu commands.

    However, I could not make it work within a script yet. My problem is that I don't have the handle to the different nurbs.

    Expert,

    Thanks for the clarification,

    If someone finds a way to add successfully the different Nurbs together in one solid, that would maybe solves our problems

  7. Ok I thing I understand now:

    The Extrude Along path and the Tapered Extrude are like PIO and not like build in objects. So we need to use CREATECUSTOMOBJECTPATH('Extrude Along Path', the3Dpath, theProfile) to create them.

    On the other hand, the function SubtractSolid does not accept handle to PIO as argument.

    Is that correct??

    Doest is mean that it is impossible to subtract those kinds of extrude from a 'normal' extrude in a script??

  8. When using CreateExtrudeAlongPath & CreateTaperedExtrude in stripts, it creates a bunch of NURBS Surfaces objects instead of creating "Extrude Along Path" or "Tapered Extrude" objects.

    The geometry is correct, but it makes it unusable because I would like to subtract the created object to another extrude using the SubtractSolid function:

    FUNCTION SubtractSolid(obj1 :HANDLE; obj2 :HANDLE; VAR newSolid :HANDLE) :INTEGER;

    Is this a Bug or Am i doing something wrong?

    Thanks,

  9. I write all my user-made functions in a external file "functions.vss" that I include in my other script.

    Of course, all my PIO's do not use all the functions but they still contain all of the function declarations within their script.

    Can this make the PIO's slower to be created / reset during their use?

    Or does it only make their compilation slower?

    Is there an other way to handle user made functions?

    Thanks,

  10. I get some time very weird compiling errors when I use

    {$ include "files"}. Those errors don't have anythink to do with the included file.

    So i usually look for some mistake or mistyping for a while and I never find it.

    The only way to make them got away is to copy the exact same content of included file to the main file and the script compiles correctly.

    I don't know if this has to do with some script length limitation, but it is driving my crazy...

    Does anyone no what going on?

    Is this problem only in the Belgian version??

    Help, Please.....

  11. Thanks for the answers,

    I tried without any undo history and the problem stayed anyway.

    I actually changed all my object to Event enabled objects so I could set more precisely when my objects are to be updated. I works pretty fast know (maybe 20x faster) even If I not sure what the problem was.

×
×
  • Create New...