Accessing active entity in a macro : # or ; or something else?

Accessing active entity in a macro : # or ; or something else?

precicam
Advocate Advocate
758 Views
2 Replies
Message 1 of 3

Accessing active entity in a macro : # or ; or something else?

precicam
Advocate
Advocate

I was under the impression that we can access the active entity using '#' or ';'

 

PROBLEM : 

I have two boundaries B1 and B2. Lets say B2 is active and I want to make a pattern from this boundary.

I create a pattern and insert the active boundary using the following macro commands : 

 

CREATE PATTERN ;
EDIT PATTERN # INSERT BOUNDARY #

 

It even works under most cases, but I found an exception : 

 

Before running the macro commands, try the following using the GUI :

 

0. Activate boundary B2

1. Create a pattern by right click Pattern -> create Pattern

2. Right click the newly created pattern, insert boundary -> choose B1

 

Now if I run the macro commands mentioned above, the pattern gets created from boundary B1 even though the active boundary is B2.

 

Is there a different way to access active entities? Will I have to loop though all boundaries, find the active one, assign it a variable and then use it to insert into a pattern?

 

 

0 Likes
Accepted solutions (1)
759 Views
2 Replies
Replies (2)
Message 2 of 3

precicam
Advocate
Advocate

Ok figured out that changing # to ; in the following line :

 

EDIT PATTERN ; INSERT BOUNDARY #

 

solves the problem. But there is no documentation for what # and ; mean?

0 Likes
Message 3 of 3

TK.421
Advisor
Advisor
Accepted solution

The # is the last created entity. I rarely use this unless my macro is creating only one thing that is not activated upon creation, for me it usually causes more problems than it helps solve.  the ; is for an active entity.

 

use this:

 

create pattern ;

edit pattern ; insert boundary ;


the numbers never lie