Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 63

Thread: Ruby Console

  1. #31
    Join Date
    Jul 2007
    Posts
    288
    Pity we cant use rich text for this, and have different font size etc.
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  2. #32
    Join Date
    Jul 2007
    Posts
    288
    I have just been testing this, I built a second floor, and it seems to be working in cm, this I would probably need to show in mm, preferably m with 3 decimal places
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  3. #33
    Join Date
    Jul 2007
    Posts
    288
    Well, for the life of me, I cannot get the ruby tutorial running, I really have no idea how to use it, I have tried, show 1, show # etc, I have tried running from CA installed templates.... to no avail...
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  4. #34
    Join Date
    Jul 2007
    Posts
    288
    > show
    => Ruby NameError: undefined local variable or method `show' for main:Object
    Stack Trace: from (eval):1:in `<main>'


    this is what happens when I press the tutorial button...
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  5. #35
    Join Date
    Oct 2009
    Posts
    904
    Tim

    Your error above indicates that a Ruby script is already running in the back ground when you opened the console. Show is not a Ruby key word-- so you get a error

    Type in something like

    1+2
    If you get back 3, Ruby is already running and you can not start the tutorial as it is a totally different script. Again- try exiting and using a new clean plan.

    Also, I believe the info back from the Macros is fixed in CM. not changeable by User. Precision of cm is only one dec. as I believe, in the background, Chief is actually using mm with 0 precision.
    Gerry

    NewCraft Home Services

    Design/ Compliance Review
    PE, X6 , Sketchup 8, TurboCad Pro 20
    -----------------------------------
    ASUS P9X79D, i7-3820, GTX680 w/4gb
    -----------------------------
    If the Government would just cut down more d*** trees, I'd have a much better view of the forest.

  6. #36
    Join Date
    Aug 1999
    Location
    Sydney Australia
    Posts
    4,044
    Tim,

    Yes, the result is in cm - I just noticed that you are in NZ.
    It shouldn't be too hard for those in the know to edit the macro so that it is formatted in mm.

    I wasn't worrying about that part yet!
    Glenn

    Chief X5
    www.glennwoodward.com.au

    Windows 7 - Home Premium
    Intel i7-920
    Gigabyte GA-EX58-UD3R
    6 Gb DDR3 1600MHz
    EVGA GTX285 1GbDDR3
    1TB Sata HD

  7. #37
    Join Date
    Oct 2009
    Posts
    904
    Tim

    if you want the result to be in meters to three decimals -- Change your Macro to:

    (finished_floor_elevation / 100).round(3)

    if you want mm use:
    finished_floor_elevation * 10

    This assumes that Chief will continue to use cm - may change in future rev.?
    Gerry

    NewCraft Home Services

    Design/ Compliance Review
    PE, X6 , Sketchup 8, TurboCad Pro 20
    -----------------------------------
    ASUS P9X79D, i7-3820, GTX680 w/4gb
    -----------------------------
    If the Government would just cut down more d*** trees, I'd have a much better view of the forest.

  8. #38
    Join Date
    Feb 2011
    Location
    Greater Seattle area
    Posts
    273
    Tim,

    To get the Ruby Tutorial don't click the Tutorial button, but type show 1 in the Input Field of the Ruby Console. Then you can type show 2 for page 2 of the tutorial, etc.

    If that doesn't work, reboot the computer and try the same in the new plan...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ruby_console_tutorial.jpg 
Views:	160 
Size:	101.4 KB 
ID:	47271  
    Last edited by alexsl; 05-10-2011 at 11:12 PM. Reason: EDIT:

  9. #39
    Join Date
    Jul 2007
    Posts
    288
    Thanks... Tutorial now seems to work... I am sure I am going mad.... I will try the Macros in meters soon, thanks. Just got my main computer back from the shop (fried one of the hard drives), so now re installing CA and every thing else...
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  10. #40
    Join Date
    Aug 1999
    Location
    Sydney Australia
    Posts
    4,044
    Gerry,

    Thanks for your great input.

    Tim,
    In case you haven't figured it out, to get mm without a decimal point use:
    (finished_floor_elevation * 10).round(0)
    Glenn

    Chief X5
    www.glennwoodward.com.au

    Windows 7 - Home Premium
    Intel i7-920
    Gigabyte GA-EX58-UD3R
    6 Gb DDR3 1600MHz
    EVGA GTX285 1GbDDR3
    1TB Sata HD

  11. #41
    Join Date
    Jul 2007
    Posts
    288
    Unreal, thanks everyone for this help, I am still creating the templates for the other 4 users at the office, I have been refining it over the 5 or 6 months, this is things I want to put in, is there anyway to create a macro, either text or ruby, that will show windows and doors height / width (in plan view) when window and door labels on that layer are turned off.

    Thanks again
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  12. #42
    Join Date
    Aug 1999
    Location
    Sydney Australia
    Posts
    4,044
    Tim,

    Can you please explain in a bit more detail what you are trying to achieve.
    There may be other ways to get what you want.
    Is there a particular reason why you don't want the sizes on the Windows, Label layer?
    Glenn

    Chief X5
    www.glennwoodward.com.au

    Windows 7 - Home Premium
    Intel i7-920
    Gigabyte GA-EX58-UD3R
    6 Gb DDR3 1600MHz
    EVGA GTX285 1GbDDR3
    1TB Sata HD

  13. #43
    Join Date
    Jul 2007
    Posts
    288
    I have been asked to show the height / width on some pages, and the callouts and schedules on some pages, just a way to use callout labels and also size labels on different layers, while you are there, I am having trouble getting the floor elevation to show in metres with 3 dec. placves as Gerry has described, am I still supposed to use %, I have tried both ways.... Thanks
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

  14. #44
    Join Date
    Aug 1999
    Location
    Sydney Australia
    Posts
    4,044
    Tim,

    The script should look like this:
    (finished_floor_elevation/100).round(3)
    This should be in the Value field without % marks.

    I have placed it in my Room Label Defaults and it works (you may need to open the room dbx and recheck Show Room Label to get it to update), but when I place it in the Room Specification dbx (Room Name) it won't work the way Gerry describes.

    I could do a Skype call and show you if you have Skype.
    Glenn

    Chief X5
    www.glennwoodward.com.au

    Windows 7 - Home Premium
    Intel i7-920
    Gigabyte GA-EX58-UD3R
    6 Gb DDR3 1600MHz
    EVGA GTX285 1GbDDR3
    1TB Sata HD

  15. #45
    Join Date
    Jul 2007
    Posts
    288
    Thanks, I don,t have Skype, but will get it, I understand updating the room labels, and I have placed it in room label DBX, will try again, thanks
    Tim Grindlay
    SurTec Group Consultants Ltd
    New Zealand
    X4

 

 

Tags for this Thread

Posting Permissions

  • Login or Register to post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •