Author Topic: using 'cal in a stretch grip dialogue box  (Read 15358 times)

0 Members and 1 Guest are viewing this topic.

Albroswift

  • Guest
using 'cal in a stretch grip dialogue box
« on: October 19, 2014, 05:49:59 PM »
Hello, All
Posted a similar question on a different forum, didn't get an answer that explained this block behavior.
Here is the situation: A lot of my blocks rely heavily on stretch parameters. Typically when activating a stretch grip, I will just type the size I want the block to be in that axis, and it stretches or shrinks TO that dimension. Example, insert a 12" X 12" block. Activate the x axis stretch, type 10, block resizes to 10" in the x direction. (still 12" in the y direction). Perfect. BUT, if I entered say 'cal 9+1, or any other routine that will return a dim, the block stretches BY that amount, the block stretches to 1' 10", not what I want. Is there a setting I am missing that would make it function as the first example? Alternately, suggest a different method of changing block dimensions that would allow for a 'cal command or lisp to change dim instead of adding to dim? Too many different sizes to use visibility state, lookup, etc.
Thanks--
AL
ACAD 2014

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: using 'cal in a stretch grip dialogue box
« Reply #1 on: October 19, 2014, 06:13:37 PM »
I'm using ACAD2006 & that entry is not supported so I can't test it.
What is your Units setting?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Albroswift

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #2 on: October 19, 2014, 06:53:36 PM »
Type: Decimal
Units to scale inserted content: Inches
Primary Units: Architectural
Secondary Units: Decimal
Multiplier: 24.500

Behavior not tied to units I don't believe.
Thanks--

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #3 on: October 20, 2014, 10:26:17 AM »
Hello, All
Posted a similar question on a different forum, didn't get an answer that explained this block behavior.
Here is the situation: A lot of my blocks rely heavily on stretch parameters. Typically when activating a stretch grip, I will just type the size I want the block to be in that axis, and it stretches or shrinks TO that dimension. Example, insert a 12" X 12" block. Activate the x axis stretch, type 10, block resizes to 10" in the x direction. (still 12" in the y direction). Perfect. BUT, if I entered say 'cal 9+1, or any other routine that will return a dim, the block stretches BY that amount, the block stretches to 1' 10", not what I want. Is there a setting I am missing that would make it function as the first example? Alternately, suggest a different method of changing block dimensions that would allow for a 'cal command or lisp to change dim instead of adding to dim? Too many different sizes to use visibility state, lookup, etc.
Thanks--
AL
ACAD 2014
If one knows the value required, why would one use the [cal] function to input that value?
Seems like you are taking the hard way to input a simple value.

Or better if the block should ONLY stretch by given increments why not build that into the stretch function?
Or use a look up table for the accepted dimensions?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Albroswift

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #4 on: October 20, 2014, 10:03:05 PM »
Your killin me, MJ...
I just used 9+1 as an example, enter 10, get =10. enter 'cal 10, get + 10
Most of my entries would be something like:
 'cal cvunits 3657,mm,in
or
 'cal 4295/24.5
or
 'cal mm2in 3650 (mm2in being a lisp routine)
Can't really do those in my head...
So, to recap---
insert dynamic block
Activate X axis stretch
Type 10
Block stretches/shrinks to 10" regardless of initial length (desired effect)
BUT
type 'cal 254/24.5
Block increases initial length by 10" (Not desired effect)
Thanks again!
Al :-D

Albroswift

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #5 on: October 20, 2014, 10:05:54 PM »
...and don't want a 5000 line lookup table...

danallen

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #6 on: October 20, 2014, 10:07:24 PM »
or
 'cal 4295/24.5

try 42950/245 and it will be accepted, avoids problem with command line division by decimal (not sure if it will snap to 10 increment as you describe)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #7 on: October 21, 2014, 08:40:19 AM »
same idea different logic....

IF

one needs to work in MM why not work in MM and NOT inches?

OR

one needs to work in inches, work in inches....

why introduce the headache and or possibility of failing to convert units properly?

personally, I don't trust [cal] function because there are instances it fails to do the math at all.


Quote
Command: CAL
>> Expression: 23414545245245*546461846949+
Error:
Integer numbers must be between 2147483647 and -2147483648

Be your Best


Michael Farrell
http://primeservicesglobal.com/

Albroswift

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #8 on: October 21, 2014, 09:04:59 AM »
Quote
"try 42950/245 and it will be accepted"
2014 will accept decimal divisor, but either way adds.
Quote
"IF

one needs to work in MM why not work in MM and NOT inches?

OR

one needs to work in inches, work in inches....

why introduce the headache and or possibility of failing to convert units properly?"

Primary drawing is in architectural, output is in architectural, some components come dimensioned in metric. this has been discussed on several forums over the years, some of us would simply like to input metric dims in a imperial dwg.
BUT regardless of my reason for wanting to use the 'cal type input, or whether one believes the 'cal works at all,  I would just like someone to explain dimension "Change" vs dimension "Add" behavior.
Thanks
Al

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #9 on: October 21, 2014, 09:33:08 AM »
Will see if I can find and answer other than;
draw those metric components in a metric file and use INSERT UNITS function to scale those blocks to inches upon insertion to
the Imperial drawing and then use inches to control stretch functions.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

BKT

  • Newt
  • Posts: 27
Re: using 'cal in a stretch grip dialogue box
« Reply #10 on: October 21, 2014, 10:21:32 AM »
or
 'cal 4295/24.5

try 42950/245 and it will be accepted, avoids problem with command line division by decimal (not sure if it will snap to 10 increment as you describe)

To the OP: I know that you're trying to find out why the cal function works the way it does, but did you try what danallen suggested and just enter the fraction without using 'cal?  I'm assuming there's a typo above and that you meant "25.4" and if that's the case, can you just enter the fraction in a dynamic block stretch, say, "2540/254" to get 10?

(I'm not where I can test this myself so I don't know if it works...)

danallen

  • Guest
Re: using 'cal in a stretch grip dialogue box
« Reply #11 on: October 21, 2014, 11:05:25 AM »
I don't understand the OP operations "Activate the x axis stretch", thus I can't comment on his question about 'cal

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #12 on: October 21, 2014, 11:08:51 AM »
Interestingly enough...using the STRETCH command on a normal rectangle does not produce the results you describe:

Select objects:

Specify base point or [Displacement] <Displacement>:
Specify second point or <use first point as displacement>: 'CAL
>>>> Expression: 2*12

stretches the box 24 units as expected

Specify second point or <use first point as displacement>: 'cal

>>>> Expression: (10+2)*3

results as expected

this suggest something could be wrong with your stretch parameter definition inside your block.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #13 on: October 21, 2014, 11:09:36 AM »
I don't understand the OP operations "Activate the x axis stretch", thus I can't comment on his question about 'cal
dynamic block with stretch function constrained to a(n) axis is how I am reading this
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: using 'cal in a stretch grip dialogue box
« Reply #14 on: October 21, 2014, 11:13:21 AM »
after re-re-re-re reading post it would appear that

A) user is not using dynamic input correctly, i.e. set base point for stretch and then pushing courser in desired direction for stretch action

or

B) there is some issue in his LISP returning incorrect value

or

C) combination of the two
« Last Edit: October 21, 2014, 11:53:05 AM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/