Jump to content

James Russell

Member
  • Posts

    398
  • Joined

  • Last visited

Posts posted by James Russell

  1. Michael,

    I swear I've used this in a script somewhere but for the life of me can't find it. I think in my application it was for Misc auto numbering on a spreadsheet.

    In my head it would have gone like this:

    VAR

    Incval, *all other ints down there* :INTEGER;

    Begin

    GetWSSelection(WSH,CR,CC,TRR,TRC,TRS,BRR,BRC,BRS);

    Incval:=0;

    {----Loop begins----}

    While Incval+TRC

    Begin

    *edits to cells as required*

    Incval:= Incval+1;

    End;

    {--------------------------}

    I think that's the approach I took but if I find an example I'll let you know.

    Hope that gets you somewhere, I'd appreciate if the higher VS coders had different approaches it'd be good to learn some.

    J

  2. Jake,

    In reply to your question you can access the CAD archive from the TomCat website and import components into your library. You'll have to register but they don't take long to send you a password. Send them an email if you have any queries about the catalog or reply here if you need assistance inserting them.

    Hope that helps,

    James

    PS. BuildingDesignConsultant - not appropriate nor relevant.

  3. Nicholas,

    I've found the Area Light to be quite handy for what I believe you are trying to achieve. I recently did a whole heap of led panel work with low res screens. Just make a polygon of any type, presumably in your case a rectangle, and choose Modify>Convert>Convert to Area Light.

    You'll get some options about direction and output. Have a play. I'll find some image if I can.

    Hope that helps.

    Cheers,

    J

  4. Hey all,

    Writing some custom scripts at the moment.

    When you're using the polyline tool and you hit the u key it cycles through the possible curve options for that tool.

    Is there a way whilst in a script I could hit a key, for example the + key and the script could increase or decrease an integer?

    In my head it would be like this:

    h:= Getkeypress; {in loop or pause?}

    If h=107 Then IntVal:=IntVal+1; {where 107 is the key value of + on numpad}

    If h=109 Then IntVal:=IntVal-1; {where 106 is the key value of - on numpad}

    Now that's not real code but is there an equivalent in VS?

    Cheers,

    James

  5. Hey all,

    I just used the create custom tool script to make this:

    Procedure CustTool;

    VAR

    Name:STRING;

    Result:BOOLEAN;

    BEGIN

    PushAttrs;

    FillBack(256);

    FillFore(257);

    FillPat(0);

    Result:= SetDefaultBeginningMarker(2, 0, 0.078735, 0.078735, 0, 0.000000, FALSE);

    Result:= SetDefaultEndMarker(2, 0, 0.078735, 0.078735, 0, 0.000000, FALSE);

    PenPat(-4);

    PenSize(2);

    CallTool(-204);

    PenBack(256);

    PenFore(257);

    PenPat(-4);

    CallTool(-204);

    PopAttrs;

    END;

    Run(CustTool);

    The main issue I'm having it that it won't save my dash style (Dash Style-4) into the script. Had a quick look at the VS appendix but couldn't find a reference to dash styles.

    Anyone have a clue what line I can add here to do dash styling?

    Cheers,

    James

  6. Hey all,

    Thanks for great responses here. I've had a read through all and have just tested your script Pat.

    It's all good in terms of rotating the symbol within the group and I'm pretty sure I can play with the IF constraints to isolate it to a symbol as required the only issue it that the rotation seems to be around the group centre not symbol centre.

    See the attached file for results and a little more insight.

    Thankyou for the responses Raymond and Miguel, it's little snippets like this that'll get me over the line at some stage ;)

    Cheers,

    J

  7. Hey all,

    Working on a little automator at the moment. I have a group containing various arc and lines and then in the middle of it a circle, lines and text all within a symbol. What I want to do is copy the group around to a few places and rotate it.

    After rotating the full group I want all the symbols contained within to remain at a rotation of 0?. I thought I'd use this opportunity to make/try a script, and I have this thus far:

    {-----------------------------}

    Procedure Loop;

    Procedure RotTest(h : HANDLE);

    VAR

    rot :real;

    BEGIN

    rot:= GetSymRot(h);

    If GetSymName(h)='Symbol-1' Then

    BEGIN

    SetRot3D(h,0,0,0,0,0,0);

    ResetObject(h);

    sysbeep;

    End;

    END;

    BEGIN

    ForEachObjectInLayer(RotTest,0,1,1);

    END;

    RUN (Loop);

    {----------------------}

    But it doesn't work. Can someone read over and let me know if I'm on the right track?

    Any help appreciated.

    Cheers,

    J

    Ps. Sysbeeps are cool okay.

  8. I personally would agree with Peter and Bill, the process of 2D - adding and subtracting, extruding and copying as a symbol. Then if you need to change a detail you change one and it changes all, you need to re align some cuts just go back in the object history.

    Interesting project though.

    J

  9. Kim,

    It is interesting, both the fact that they are rendering this way and their location within the drawing. Are you sure you haven't left a square used for crating the top of your legs on the ground plane and it's rendering this? Does it appear in another rendering mode? Hidden Line perhaps?

    If you post the file either here or through PM I'm sure someone here can assist, at the very least re-render and see what's going on.

    Cheers,

    james

  10. Thanks Maarten and Josh,

    Maarten - I tried the change, no result yet but I think I still need to do a bit more reading about handles and referencing.

    Josh - Change one field you say... Ah! This is a work around for part b) of my problem. There are two outcomes that I wanted to achieve from this. The first being object manipulation through a script from within the resource browser, ie. Select a few symbols in your browser and have them all filled black or width increased by 100mm.

    The second part was record manipulation. Much like your Instrument Maintenance can rewrite the base Light Info Record on a fixture but on a batch scale. I've done some modifications to the Light Info Record (not quite mastered yet mind you), in an attempt to give a lamp a specific Label Legend upon insertion, ie. Fluro batten having an elongated Label, ganged cyc units and small conventionals vs large conventionals. In this case I was hoping to just select the fixtures in my library and much like the dialog for Change One Field select the record/parameter/field value and set the selected fixtures. I think Change One Field will work, I'll just move batches of things into folders, make the required batch changes and move them back.

    I'll keep at it regardless in all the spare time I have ;)

    Cheers,

    J

  11. So I wrote this:

    {-------------Test Change Record - Selected Items----------}

    PROCEDURE xxx;

    CONST

    record = 'Light Info Record';

    parameter = 'Device Type';

    value = 'New Type';

    FUNCTION Replacement (h:HANDLE) : BOOLEAN;

    BEGIN

    h:=FInSymDef(h);

    SetRField(h,record,parameter,value);

    END;

    BEGIN

    ForEachObjectInList(Replacement,2,0,FSymDef);

    END;

    Run(xxx);

    {---------------}

    Two things. Didn't work. Not unexpected but would have been nice.

    The ForEachObjectInList says that Object Options can be Selected Objects Only (2), does this include if you've selected something in the resource browser?

    Secondly traversing depth... er...?

    J

  12. So right now I'm quite content with just working within my file with symbols that are within it.

    As a little starter example I'm just wanting to select my symbol in the resources browser and have the script alter the width of that object from within the symbol. I think that's the first link I need to make in my head.

    I'll keep reading this list.

    Thanks Pat for the starting point,

    J

  13. Thanks Pat,

    Seems only one screen. It's odd that before it would insist on putting my worksheets on my third monitor and now it only wants them on my first. I thought it might be related to where the dialog box was or the pallet/resource browser you were using to run the script but right now it seems it's irrelevant.

    Strange about the change in scale.

    Cheers,

    James

  14. So I've got some working values now after a little trial and error and searching through some scripts involving worksheets, *Cough* Pat Stanford *Cough*, and now I pose this.

    1) Multiple Monitors - How re: Location

    2) Percentage of screen - Identifying a users screen res and adjusting accordingly.

    Call me crazy if you believe it to be so, :)

    Cheers,

    J

  15. Hey all,

    I want to alter some records within symbols in the symbol library. My end goal is to select some symbols in the library, run the script and changes are made to records in each of the items in the library.

    I'm wondering if anyone can point me in the direction or let me know if helpful commands for:

    1. Getting a handle to object selected in the Resource Browser.

    2. Editing a record of selected symbol within Resource Browser.

    Anything relating to these would be helpful, even just for a read-through.

    Cheers,

    J

  16. Hey all,

    Just doing some repetitive worksheet creation and writing some nifty scripts.

    Can anyone tell what kind of value ranges are used for SetWSPlacement? I've been trying multiple options but I can't make my worksheet appear anywhere except the middle of the screen with no changes, which I presume means out of bounds/ I don't understand, or in the top left corner of the screen with no width or height changes.

    Cheers,

    J

  17. Shachar,

    Welcome :) !

    The black dot you are referring to is a category containing sub categories. It's created by putting a dash ( - ) in your class name. For example:

    Set - Framing

    Set - Faces

    Set - LX

    Would all appear under the category of Set and then the individual classes within. Not sure if there is a way to mass turn them all on or off though..

    Cheers,

    James

  18. Michael,

    This is why I love monday mornings. Always something new to try from a weekend worth of pondering.

    I'll have a play with these, if nothing else they are really slick. I think your approach of identifying the lamps and which position they are on, apposed to the positions and which lamps they contain is probably the more appropriate path to take at this stage.

    I'll let you know how I go.

    Cheers,

    j

  19. Hey all,

    Just doing some work on a theatrical template in some downtime.

    I have a database lookup for all the light position object in my drawing.

    Two seperate but related issues:

    1) I want to count the number of lighting devices on each position. I thought this would be =count('lighting device'.'position'=B4) where B4 is the cell of the database containing ='light position obj'.'position name'. This just returns false.

    2) I want to sum the total weight of all the fixtures on my position. Perhaps some sort of sum if? Don't really know where to head with that one.

    See attached for the basic layout screenshot.

    Cheers,

    J

  20. It is possible in VW, I do it with colour documents all the time.

    Go to Print. From the centre dropdown go to Colour Matching. Choose ColourSync and in the profile dropdown select Other Profile..., select the Generic Grey Profile and hit print.

    I would presume it's similar for the windows client but I can't check till later.

    J

  21. Can't believe I forgot this one:

    - Allow for criteria to be subtracted from the non-final criteria on the list.

    Like an except to the criteria?

    As for the hand, I just select a column, move down a few pixels to get the hand, click and drag to a new position. It works with multiple columns selected too.

    J

×
×
  • Create New...