Open ended RevCloud macro

Open ended RevCloud macro

m_rogoff
Advocate Advocate
1,511 Views
15 Replies
Message 1 of 16

Open ended RevCloud macro

m_rogoff
Advocate
Advocate

I have a macro below to draw an open-ended RevCloud. There are a couple issues. Please help, thanks

1. The command stops after drawing the RevCloud. It does not make the next layer S-REV-TAG. Why does it not continue through the entire command?

2. I get this message in command line:    "Guide crosshairs along cloud path...N / Invalid point."   The N is for Reverse direction [Yes/No] <No>: N 

 

^C^C_layer;m;S-REV;c;1;;;_revcloud;\n;_layer;m;S-REV-TAG;c;1;;;-insert;delta;;;

0 Likes
1,512 Views
15 Replies
Replies (15)
Message 2 of 16

hmsilva
Mentor
Mentor

Hi m_rogoff,

 

I think it will not be possible to use the revcloud command in a macro, and wait for the user to end the command...

In a macro, as you know, each '\' is a pause, we would have to know how many arcs the revcloud would have, for we add enough '\' to end the code...

One possible workaround that occurs to me is to use one object to create the revcloud, for instance a lwpolyline with a predefined number of vertices or an arc.

 

^C^C_layer;m;S-REV;c;1;;;_arc;\\\_select;_L;;_revcloud;_o;_L;_N;_layer;m;S-REV-TAG;c;1;;;-insert;delta;;;

  

 

Hope this helps,
Henrique

 

EESignature

0 Likes
Message 3 of 16

m_rogoff
Advocate
Advocate

Thanks Henrique, I will test this out.

 

It seems like we should be able to draw an open-ended revcloud. The user guides the crosshairs along the path to create a revcolud, you don't actually click each spot. It automatically finishes the cloud once the endpoint meets the start point. My intuition says 2 pauses for user input would work, however, ACad is not cooperating. 

0 Likes
Message 4 of 16

hmsilva
Mentor
Mentor

@m_rogoff wrote:

Thanks Henrique, I will test this out.

 

It seems like we should be able to draw an open-ended revcloud. The user guides the crosshairs along the path to create a revcolud, you don't actually click each spot. It automatically finishes the cloud once the endpoint meets the start point. My intuition says 2 pauses for user input would work, however, ACad is not cooperating. 


You're welcome, m_rogoff!

 

AutoCAD is reading the crosshairs coordinates as it is moving, and providing three points for each arc... do this makes more sense?


Henrique

EESignature

0 Likes
Message 5 of 16

m_rogoff
Advocate
Advocate

Henrique, how about using an open-ended Polyline? I started this code, but it craps out after drawing the Pline and before envoking the Revcloud command. Any suggestions? Thanks

 

 

^C^C_layer;m;S-REV\c;1;;;POLYLINE;\(while $(> $(getvar 'CmdActive) 0) (command pause))revcloud;_O;_L;n;^C^C_layer;m;S-REVISION;c;5;;;-insert;delta;_scale;$M=$(*,$(getvar,dimscale),1);\;

 

 

0 Likes
Message 6 of 16

hmsilva
Mentor
Mentor

Hi m_rogoff,

 

DIESEL is very limited, we can't call a command, leave the command 'opened', wait for the user end the command, and proceeding with the macro...

The 'while' function is not a DIESEL function, you'll need to use AutoLISP to test for the CmdActive SysVar.

 

These are the functions we can use in a DIESEL macro

 

To use the 'pline' command, we have to hard-coded the polyline segments number.

For instance, using a five segment polyline, we can use a macro like this:

 

^C^C_layer;m;S-REV;c;1;;;_Pline;\\\\\\;revcloud;_O;_L;n;^C^C_layer;m;S-REVISION;c;5;;;-insert;delta;_scale;$M=$(*,$(getvar,dimscale)​,1);\;

 

As I have said, DIESEL it's very limited...

 

Hope this helps,
Henrique

 

EESignature

0 Likes
Message 7 of 16

Anonymous
Not applicable

I am modifying my macro to use a Polygonal revcloud with AutoCad 2016.

This does not. Please advise, thanks in advance

 

^C^Crevcloud;P;///////;

 

 

Command: Revcloud
REVCLOUD
Minimum arc length: 0.5000 Maximum arc length: 0.5000 Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>: p

0 Likes
Message 8 of 16

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

I am modifying my macro to use a Polygonal revcloud with AutoCad 2016.

This does not. Please advise, thanks in advance

 

^C^Crevcloud;P;///////;

 

....

Change those forward slashes to backslashes.

Kent Cooper, AIA
0 Likes
Message 9 of 16

hmsilva
Mentor
Mentor

@Anonymous wrote:

I am modifying my macro to use a Polygonal revcloud with AutoCad 2016.

This does not. Please advise, thanks in advance

 

^C^Crevcloud;P;///////;

 

 

Command: Revcloud
REVCLOUD
Minimum arc length: 0.5000 Maximum arc length: 0.5000 Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>: p


Hi MRogoff,

 

a pause is a "\" not a "/", but the only way iI can run the commandline version is using 'initcommandversion' function... 

 

^C^C(initcommandversion);_revcloud;P;\\\\\\\;

 

Hope this helps,
Henrique

EESignature

0 Likes
Message 10 of 16

Anonymous
Not applicable

D'oh! I did have the correct slashes "\" in my macro, but it still draws the Revcloud as freehand. I have a couple commands after the revcloud, and the issue with a freehand cloud is the entire macro craps out after you complete the loop, because there is no click or user input needed to finish the cloud. 

 

I get this message in AutoCad LT when I use HMSilva's:

Command: (initcommandversion)
LISP command is not available.

0 Likes
Message 11 of 16

hmsilva
Mentor
Mentor

@Anonymous wrote:

..

I get this message in AutoCad LT when I use HMSilva's:

Command: (initcommandversion)
LISP command is not available.


Yes, LISP is not avaliabe in LT...

I just post the macro with (initcommandversion) because it was the only way I managed to get the correct revcloud's command version...

 

 

Henrique

 

EESignature

0 Likes
Message 12 of 16

Anonymous
Not applicable

Is there a way to get the Freehand cloud to work in a macro with additional commands following it? Thank you

 

^C^Crevcloud;\_insert.....(rest of macro)

0 Likes
Message 13 of 16

hmsilva
Mentor
Mentor

@Anonymous wrote:

Is there a way to get the Freehand cloud to work in a macro with additional commands following it? Thank you

 

^C^Crevcloud;\_insert.....(rest of macro)


I'm not a LT user, but as far as I know, no...

 

Henrique

EESignature

0 Likes
Message 14 of 16

Anonymous
Not applicable

When I run the command manually, it remembers my last choice as Polygonal (highlighted in Red in the paragraph below)

 

when I do a macro that runs Revc, makes the selection, cancels the command, then repeats Revc, it reverts back to Freehand

^C^C_revcloud;P;^C^C_revcloud;\\\\\

 

 

Command: REVCLOUD
Minimum arc length: 2'-0" Maximum arc length: 2'-0" Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>: p
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>:
Specify next point:
Specify next point or [Undo]:
Specify next point or [Undo]:
Command: REVCLOUD
Minimum arc length: 2'-0" Maximum arc length: 2'-0" Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>:
Specify next point:
Specify next point or [Undo]:
Specify next point or [Undo]:

0 Likes
Message 15 of 16

hmsilva
Mentor
Mentor

@Anonymous wrote:

When I run the command manually, it remembers my last choice as Polygonal (highlighted in Red in the paragraph below)

 

when I do a macro that runs Revc, makes the selection, cancels the command, then repeats Revc, it reverts back to Freehand

^C^C_revcloud;P;^C^C_revcloud;\\\\\

 

 

Command: REVCLOUD
Minimum arc length: 2'-0" Maximum arc length: 2'-0" Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>: p
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>:
Specify next point:
Specify next point or [Undo]:
Specify next point or [Undo]:
Command: REVCLOUD
Minimum arc length: 2'-0" Maximum arc length: 2'-0" Style: Normal Type: Polygonal
Specify start point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>:
Specify next point:
Specify next point or [Undo]:
Specify next point or [Undo]:


Is this the output from the macro?

Using ^C^C_revcloud;P; I could not get this options... just the old ones

Specify start point or [Arc length/Object/Style] <Object>:

 

using

^C^C_revcloud;P;\\\\;n;zoom;e;

runs the zoom command?

 

I don't have in this laptop....

 

Henrique

EESignature

0 Likes
Message 16 of 16

hmsilva
Mentor
Mentor

Hi MRogoff,

tested in a box with AC2016, and it works...

 

^C^C^R_revcloud;P;\\\\\\\;_zoom;e;

Hope this helps,
Henrique

EESignature

0 Likes