Jump to content

Move a block with script


Adam Parker

Recommended Posts

I have a block called "north"....I need to move the block in increments of 6" and render an image to create an animation. Can anyone help me out with the proper script to do this. thanks in advance. --AP

Link to comment
Share on other sites

  • 1 month later...

Mircea,

You helped me out on script to move something...which was awesome! How about to rotate a block about a point? Thanks.

--AP

Link to comment
Share on other sites

This statement will rotate the same block around origin with -15 degrees:

(command "_ROTATE" (ssget "_X" '((0 . "INSERT") (2 . "NORTH"))) "" '(0 0 0) -15.0);

For sure this line may be refined to other results, but will need to get before more details from you on what you intend to achive by said rotation.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks again for your help. You are very knowledgeable.

I am going to take a shot in the dark here........We are looking to build some 3d models in cad and are wanting to manipulate the models with menu functions (.cuix or .mnu files). I am assuming we will need to build/load a .vlx or something to define the model. However, I am not quite sure how to make this happen or put it together. Is this something you might be interested in? Are you available for hire for something like this?

Thanks,

--Adam

Link to comment
Share on other sites

Me again..... I am now trying to rotate and object 10 degrees around a point. I called out the coordinates of the rotation point but get the command back "Specify base point:" any ideas? Here is my script;

(command "_ROTATE" (ssget "_X" '((0 . "INSERT") (2 . "rotor"))) "" '(964'-10.46592178" -1406'-6.23244661" 271'-0.02875073") -10.0);

Link to comment
Share on other sites

Since your input is Imperial, please pay attention that in order to specify a point as an AutoLISP list you should use decimal values:

(command "_ROTATE" (ssget "_X" '((0 . "INSERT") (2 . "rotor"))) ""
                  [color=red]'(11578.46592178 -16878.23244661 3252.02875073)[/color] -10.0);

An alternative will be to input said point as a sting, similar with what you do on prompter:

(command "_ROTATE" (ssget "_X" '((0 . "INSERT") (2 . "rotor"))) ""
                  [color=red]"964'-10.46592178,-1406'-6.23244661,271'-0.02875073"[/color] -10.0);

 

 

For the future, please use tags to post code excerpts.

Link to comment
Share on other sites

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...