XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
Area Coloring
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
Author Message
sanjeev.dhara
User


Joined: 08 Apr 2014
Posts: 8

PostPosted: Tue Sep 08, 2015 7:25 pm  Reply with quote

Hi Everyone,

I am working with a matrix containing sorted contiguous areas. Each row contains areas which must appear the same color. Each time the macro is run, a different number of rows containing contiguous areas will be generated. Furthermore, each row may contain a different number of areas. I was hoping to get some guidance regarding how to make each set of areas appear the same color.

Currently my strategy is as follows:

Say a row contains the following area numbers: 33, 34, 45, 28

Then the following code would be used to have this group of areas appear one color

ASEL, S,,33
ASEL, A,,34
ASEL, A,,45
ASEL, A,,28
CM, Tempname, AREA
CMPLOT,Tempname,AREA

Currently one of the issues I am running into is that I have to type in this section of code manually as each newly defined component requires a new name (shown in the above code as "Tempname"). Is there some sort of alphanumeric way to automatically generate new entity names so that I could run this section of code within a loop in a macro?

Best,
Sanjeev
_________________
Sanjeev Dhara
Undergraduate Student
Cornell University
Back to top
View user's profile Send private message
Martin Liddle
User


Joined: 15 Aug 2008
Posts: 1274
Location: Chesterfield, UK

PostPosted: Wed Sep 09, 2015 5:04 pm  Reply with quote

[quote="sanjeev.dhara"]

ASEL, S,,33
ASEL, A,,34
ASEL, A,,45
ASEL, A,,28
CM, Tempname, AREA
CMPLOT,Tempname,AREA

Currently one of the issues I am running into is that I have to type in this section of code manually as each newly defined component requires a new name (shown in the above code as "Tempname"). Is there some sort of alphanumeric way to automatically generate new entity names so that I could run this section of code within a loop in a macro?
[/quote]
Assuming your loop variable is J then something like

Cm,Tempname%J%,AREA

should generate variable Tempname1, Tempname2 etc.
_________________
Martin Liddle, Tynemouth Computer Services,
Chesterfield, UK.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

sleek template created by Andrew Charron