Name MODELCOMPSET with workplane name

Name MODELCOMPSET with workplane name

raffnecBNJ8C
Contributor Contributor
634 Views
1 Reply
Message 1 of 2

Name MODELCOMPSET with workplane name

raffnecBNJ8C
Contributor
Contributor

I want to create several MODELCOMPSET whose names will contain the name of the workplane name.
For instance:
a_G55
b_G55
a_G56
b_G56

But I don’t understand the syntax of writing a macro.

CREATE LEVEL a_$workplane.name MODELCOMPSET

I get MODELCOMPSET with the name "a_$workplane.name", I wanted it to be a_G56.

0 Likes
Accepted solutions (1)
635 Views
1 Reply
Reply (1)
Message 2 of 2

rafael.sansao
Advisor
Advisor
Accepted solution
FOREACH wp IN FOLDER("WORKPLANE") {
	STRING $newName = "a_" + $wp.Name
	IF NOT entity_exists(entity("Level",newName)) {
		CREATE LEVEL $newName MODELCOMPSET
	}
}

Rafael Sansão

OptiNC - www.optinc.tech

EESignature