tlinder
Members-
Posts
19 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Everything posted by tlinder
-
I think it has something to do with one drive. When I went to my $LOAD_PATH on my local and right clicked on tutorial > properties > file path I had a different file path than what was listed in chief for the $LOAD_PATH.
-
I also found out that the default $LOAD_PATH was wrong.
-
I finally got everything to work!!! Thanks everyone all your help! I was able to use Alaskan_Son's method. I couldn't get Chief to evaluate the macros for the longest time, so after much thought, I decided to restart Chief and everything works as it should.
-
We have over 200 template files. If I placed them in every file and that macro changes, I would have to update every macro in every file manually. I'm trying to prevent re-entry.
-
My overall goal is to create a macro in Chief to require a .rb file that is stored from a folder on a shared drive. I don't want to put it in my scripts folder that is connected to Chief because that drive (C: drive) is not shared. Instead IT is creating a new drive (Z: drive) for us, so everyone will have the same file path. There are many computers that will be opening the files in Chief. I need to be specific with my file path and it needs to point to the Z: drive I hope this helps. For ex: C: drive - not shared - where Chief is currently installed Z: drive - IT created - shared - this is where I want to store my scope1.rb - same file paths on every computer
-
Thank you for the YouTube video Eric. Is there a way to define a new $LOAD_PATH to a different drive. I ask this because, I'm not the only one that is going to be opening these files. To my knowledge they all need to be "required" from the same file path.
-
Evaluation Error: Ruby SecurityError: Insecure operation - require Stack Trace: from (eval):2:in `block (3 levels) in <main>' from (eval):1:in `instance_eval' from (eval):1:in `block (2 levels) in <main>' from eval:9:in `eval' from eval:9:in `block (2 levels) in <main>' from eval:3:in `loop' from eval:3:in `block in <main>'
-
Are you saying to create a folder and name it $LOAD_PATH? I'm not sure what you mean.
-
Joe and Michael I tried both of those approaches and I wasn't able to get the right output in Chief.
-
Thank you for the easier format and the YouTube videos. You gained yourself a new subscriber! Yes I'm just trying to have the standard lumber lengths populate in the rafter labels.
-
Initially yes, but for future updates I can just change the macro on the .rb file and it automatically updates the file when they are opened.
-
Thank you Joe I will do some more research I this. I appreciate all your help!
-
Thanks Joe The macro works in evaluated, just trying to take it one step further and save the company a lot of time. I'm am trying to read it from my local so I don't have to open every CA file and update them 1 by 1. We have hundreds of files.
-
I'm trying to run a .rb file that's on my local in CA by using a marco. Right now I can only get it to read the file. Does anyone have any insight on how I might be able to to this or where I need to look? Macro: In CA File.read("C:/Users - Desktop/scope1.rb") Output: from text stored on a local drive rafter_length = (length.to_f.round / 12) + 1 convert_to_int = rafter_length.even? case when convert_to_int == true resut = rafter_length when convert_to_int == false result = rafter_length +1 end
-
Thank you so much for your help!
-
I am using X13.
-
I have not tried that route. Thank you for suggesting it.
-
Thank you for you quick reply. I am new to Ruby. All this language is still new to me.
-
I'm trying to create a macro that will calculate the area in polylines and show it in a separate text box. This is needed to calculate sod, concrete, sidewalk ect. I found a macro that I have been trying to manipulate to do this. Attached is a simple file that a have been experimenting with to achieve my desired results. This is the script: $_2ExistingBoxSQFT = area rescue $_2ExistingBoxSQFT if $_2ExistingBoxSQFT == 0 na = "N/A" "#{na}" else "#{$_2ExistingBoxSQFT.round(2)} SQ. FT." end This is the evaluation error it is giving me: Evaluation Error: Ruby NoMethodError: undefined method `round' for nil:NilClass Stack Trace: from (eval):1:in `instance_eval' from (eval):1:in `block (2 levels) in <main>' from eval:9:in `eval' from eval:9:in `block (2 levels) in <main>' from eval:3:in `loop' from eval:3:in `block in <main>' Macro Test.plan