Jump to content

Musisback

Member
  • Posts

    154
  • Joined

  • Last visited

Everything 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. Is it possible to create warning ourself? As the build-in function getname(hd) send a waring when hd = nil, I would like my user made functions to sent warnings in some cases. EX: GetMyPIOtype (hd) send a warning if hd is not a pio.... Thanks,
  3. 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,
  4. 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 !!
  5. Well, It seems like this is not possible on windows.... (see my attached-file)
  6. I was hoping I wouldn't need to do that... I have a lot of colors to add. Thanks
  7. Is there any way to get a color by clicking on a bitmap. This tool it present in almost all drawing sofware but I can't find it in VW. It looks like the eyedropper does not work to pick colors from bitmats. Thanks,
  8. All right thanks! I didn't really get your hunting ferret thing, but that is not the most important for me right know....
  9. I can't find the function that gives the name of a PIO. I mean by name, the type of PIO and not the data name that the function getname(H : handle) returns. Thanks,
  10. 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.
  11. Why is that? It works just fine in most cases. - 2D reshape the PIO - Control points picking and dragging - Changing parameter in the object info palette ..... The only way it doesn't work is when it is modify by another script. And still, if after updating it from a script, the dimension does not update right away , it does when I move or change anything from the PIO.
  12. 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
  13. Wel, I does't work for me : Warning: TESTXDR THECORNICE - Object handle is not to a 3D object. Seconds to Execute: 0.03 Actually, the function CREATEEXTRUDEALONGPATH assign the handle of one of then NURBS surfaces to theCornice and not some 3D object composed with all the NURNS ...
  14. 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
  15. 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??
  16. I Actually tried to create the extrude in A PIO but then the SubtractSolid function fails.
  17. 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,
  18. Alright,Thanks. The problem a get now is that there are quote marks in the criteria: PON='obj type' so I have trouble assigning the good value to the string. I could make it work using concat('PON=',chr(39),'obj type',chr(39) .... ) but it is not a very practical way... Is there an easy way to assign quote marks to a string?
  19. I am trying to create a procedure that uses 'C: Criteria' as parameter like in the build-in procedure "ForEachObject(callback :PROCEDURE; c :CRITERIA)" The compiler does not recognise the Criteria variable type. Do I do something wrong? Or is writing such procedure impossible? Thanks,
  20. 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,
  21. No empty line ! That was the problem that made me loose so much time.... I don't know how missed this info before. This it is such an important one... Thanks,
  22. 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.....
  23. 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.
  24. it Has actually more to do with the number of similar action I did before. When a just opened the file, it works fine but after some action, it begins to get slow. If a close and reopen the file, it works fine again...
×
×
  • Create New...