Jump to content

Recommended Posts

Posted

Is there any way to include a trig function in the displacment distance?

@(7sin60)

I have to calculate it each time and type in something like the following:

@6.062178

 

Thanks in advance.

Posted

Try this:

@(* 7 (sin 60))<75

it should work ... if the angle is 60RADIANS

For degrees:

@(* 7 (sin (/ (* 60 PI) 180)))<75 

I admit that it is pretty complicated for a beginner, you should read the help file for Lisp expression

Posted

I'm afraid that the OP had listed LT as his AutoCAD type, so AutoLISP expressions aren’t applicable.

 

Regards,

Mircea

Posted

An alternative solution is to use Excel to do the calculation and build the displacement string - use cells A1, A2 and A3 to fill your values and copy-paste the concatenated string to AutoCAD command prompt.

=CONCATENATE("@", ROUND(A1 * SIN(A2 * PI() / 180), 5), "<", A3)

 

Regards,

Mircea

Posted

Or another alternative is to use the Windows calculator, and again copy-paste the answer into the command line.

WindowsCalculator.jpg

Posted

You can use quickcalc in AutoCAD transparently and insert with Apply.

Posted
You can use quickcalc in AutoCAD transparently and insert with Apply.

 

Yes, I was wondering whether LT had that facility. :unsure:

  • 3 weeks later...
Posted
An alternative solution is to use Excel to do the calculation and build the displacement string - use cells A1, A2 and A3 to fill your values and copy-paste the concatenated string to AutoCAD command prompt.

=CONCATENATE("@", ROUND(A1 * SIN(A2 * PI() / 180), 5), "<", A3)

 

Regards,

Mircea

 

The above expression is written in Excel. Is it correct?

Then how do you send this expression into cad? copy/paste?

Posted
The above expression is written in Excel. Is it correct?

That's true, it is a formula for Excel. I proposed that to help OP build desired expresion since on LT there is no AutoLISP available.

 

Then how do you send this expression into cad? copy/paste?

 

The method is indeed Copy/Paste - I already stated that into my post; just be careful to copy from cell, not from formula field.

 

Regards,

Mircea

  • 3 months later...
Posted
@6.062178

 

Is the distance you require one that will change frequently? Is it in anyway related to the scale of the drawing?

 

I just discovered that you can use 'spacetrans command within the displacement function. This may not be helpful to you, but it does keep the hope of a transparent calculator alive. I only learned about 'spacetrans command last month, after 7 years of CAD. Perhaps there are others that can be used in this way? I am yet to find a comprehensive list.

Posted

Okay, so Spacetrans may not be helpful to you at all.

 

But the ' used before a command to use that command transparently inside another command may be of more use.

 

You can use a command line calculator function called CAL. I have not had time to get the 7sin60

 

Command: M MOVE

Select objects: 1 found

 

Select objects:

 

Specify base point or [Displacement] : D

 

Specify displacement : 'CAL

>>>> Expression: SIN(60)

 

Resuming MOVE command.

 

Specify displacement : 0.86602540378444

Posted
Is the distance you require one that will change frequently? Is it in anyway related to the scale of the drawing?

 

I just discovered that you can use 'spacetrans command within the displacement function. This may not be helpful to you, but it does keep the hope of a transparent calculator alive. I only learned about 'spacetrans command last month, after 7 years of CAD. Perhaps there are others that can be used in this way? I am yet to find a comprehensive list.

 

What is spacetrans command?

Posted

Spacetrans outputs the model space distance of a paperspace distance input by the user.

 

It is particularly good for setting standard text heights in all different scales.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...