Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

combined commands in one macro button

4 REPLIES 4
Reply
Message 1 of 5
jthorgo
413 Views, 4 Replies

combined commands in one macro button

Hi guys

 

I am trying to create a short cut button with a macor code.

I want it to set up a new orgin and set a base point in xrefs i am creating

 

The commands i want to combined are the follwoing

 

UCS enter

3P enter

BASE enter

 

The macro i am using is the following

^c^c_ucs 3p \\_base \

but it wont run the base command after it finishes the 3P command

 

This is whats show up in my commands bar

 

Command: _ucs
Current ucs name:  *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis]
<World>: 3p
Specify new origin point <0,0,0>:
Specify point on positive portion of X-axis <117381.06,6796.84,0.00>:
Specify point on positive-Y portion of the UCS XY plane
<117380.06,6797.84,0.00>: _base
Invalid point.

Specify point on positive-Y portion of the UCS XY plane
<117380.06,6797.84,0.00>: Regenerating model.

 

any help would be appreciated

 

cheers

jthorgo

 

 

 

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: jthorgo


@jthorgo wrote:

.... 

I want it to set up a new orgin and set a base point in xrefs i am creating

 

The commands i want to combined are the follwoing

 

UCS enter

3P enter

BASE enter

 

The macro i am using is the following

^c^c_ucs 3p \\_base \

but it wont run the base command after it finishes the 3P command

 

....

Specify new origin point <0,0,0>:
Specify point on positive portion of X-axis <117381.06,6796.84,0.00>:
Specify point on positive-Y portion of the UCS XY plane
<117380.06,6797.84,0.00>: _base
Invalid point.
.... 


That's because it hasn't finished the UCS command and its 3P option [not the 3P command -- that's the default shortcut for 3DPoly] -- the very name of the option implies you would need three backslashes after the 3P for User input to define the UCS, and the prompts confirm it.

Kent Cooper, AIA
Message 3 of 5
jthorgo
in reply to: Kent1Cooper

Thanks Kent.

Message 4 of 5
scot-65
in reply to: jthorgo

Here is the LISP eqivalent example.

Notice for the third point it is "" [Enter].

 

(command ".ucs" "3" PT1 PT2 "")

 

When I write macro/script, I do not use spaces.

 

^c^c_ucs;3p;\\;_base;\

 

???

 


 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 5 of 5
Kent1Cooper
in reply to: scot-65


@scot-65 wrote:

Here is the LISP eqivalent example.

Notice for the third point it is "" [Enter].

 

(command ".ucs" "3" PT1 PT2 "")

....


Really, the AutoLISP equivalent of their routine, with an Enter added to "complete" the UCS command [if that's really what they want -- see below] would be:

 

(command ".ucs" "3" pause pause "" "_base" pause)

 

Making the third point response an Enter will put the new UCS XY plane parallel to the current one if the first two points are in a plane parallel to it [which they might not be], but with presumably a new origin and/or a new rotation.  That is certainly not the only possible desired result.  One could want it "facing" downward, in which case one would pick a third point on the negative-Y side relative to the first two points, or one could want it non-parallel, in which case one would pick a third point not in the XY plane relative to the first two points.

 

If one would need those options, it would be necessary to answer three point prompts, and the equivalent would be:

 

(command ".ucs" "3" pause pause pause "_base" pause)

 

or in macro format, with three backslashes where the original has two, rather than two backslashes and a semicolon or space.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost