×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CUI Macro?

CUI Macro?

CUI Macro?

(OP)
This follows on from an earlier thread (Centre of Polyline and scale) but I thought that it is different enough to warrant a new thread. I am using AutoCAD LT at the moment and cant find the tool for running lisps. Is this possibly because AutoCAD LT can't do this? So I have had a go at creating a command in the CUI although I have very little idea of what I am doing.
The basic command that I want to fuse together are.
1) create region from polyline
^C^C_region
2) Read the mass properties using massprop
^C^C_massprop
3) read the centroid x and y values from massprop and use them to scale by.
4) scale by a factor of 0.9
$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_scale,^C^C_scale)

Is there any way to combine these commands into one?

RE: CUI Macro?

(OP)
So far I have managed to work out th following

This creates a region from a polyline and then calls up the mass properties.

^C^Cregion;\;_^C^C_massprop^M\;N;

but how to ask it for the x and y centroids?

Andrew299

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources