Recommended Posts

22 minutes ago, BrownTiger said:

3. It would have made more sense for CA to implement .to_ftin... Instead of us embedding local converter functions.

 

Yes I believe it was requested and should definitely not been something that needed to be requested after the fact.

 

22 minutes ago, BrownTiger said:

4. .to_in ... makes no sense to me because it gives you the decimals. I fully dig .to_mm or .to_m because they are decimals, but what in the heck is 7.23" really is, why would someone want decimal representation of an empirical unit?

 

It is used in other disciplines but not so much in residential construction.

Share this post


Link to post
Share on other sites
8 minutes ago, BrownTiger said:

1. I assumed you locally defined this ConvertToFeetInches function right? 

 

That was just copied and pasted from Eric's code.

 

9 minutes ago, BrownTiger said:

4. .to_in ... makes no sense to me because it gives you the decimals. I fully dig .to_mm or .to_m because they are decimals, but what in the heck is 7.23" really is, why would someone want decimal representation of an empirical unit?

 

I use this type of formatting for all sorts of things actually.  Most importantly though, regardless of what I am ultimately displaying, I still want precision.  I may or may not ultimately put 7.23" on some drawings, but I want to know that's what the number is, and I want to use that number in any calculations.

Share this post


Link to post
Share on other sites
28 minutes ago, BrownTiger said:

Even if software uses for some reason that internally it should never be a default display.

 

Where are you seeing this as a "default display"?

Share this post


Link to post
Share on other sites
5 hours ago, Alaskan_Son said:

Typically the only thing you have to do to ensure your code will work in both X12 and in older versions is explicitly convert your desired object attributes to floats.  So, your macro would just need the last line to read...

 

ConvertToFeetInches(height.to_f,16, "-", "-", true) + "x" + ConvertToFeetInches(width.to_f,16, "-", "-", true)

 

Thanks Michael.

 

I added the following code to the function -- anyone see any problems with this? 

 

It now works in X12 and X11 and keeps the call cleaner.

 

  if number.is_a? Float
  else
    number=number.to_f
  end

Share this post


Link to post
Share on other sites

Ok I figured out what I wanted to accomplish for my window schedule using solvers hw.txt.

 

1. Open CA-X11 with a new plan, then opened Text Macro Management-copied then paste solvers hw.txt. (Make sure to click on evaluate and owners object in Context)
2. Open default settings, then open window default, open label, 
   clicked specify label on "labels Options". 
3. insert macros %schedule_number% %window_label% %type_code% press ok and done to close the default settings.

 

I turned off the callout label in the window schedule specification box.

 

I hope this helps. 

 

with out window schedule.JPG

with window schedule.JPG

Share this post


Link to post
Share on other sites
3 hours ago, BrownTiger said:

3. It would have made more sense for CA to implement .to_ftin... Instead of us embedding local converter functions. Just my $.02

3 hours ago, Chopsaw said:

Yes I believe it was requested and should definitely not been something that needed to be requested after the fact.

 

That's what the NumberFormatter is for. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Member Statistics

    27855
    Total Members
    6254
    Most Online
    kfilipova
    Newest Member
    kfilipova
    Joined