XANSYS Message: 276 [Go back to message list] [bookmark on del.icio.us]
No rating yet Subject: Re: SELECT Criteria / and improved SelMshd macro Author: Tony Artiles Date: 1999-01-15 17:56:00John,
I believe the command you refer to is: *get,par,Entity,n,ATTR,NELM which I used in the macro below. I simplified it a bit and added a second element to allow it to apply also to volumes.
I suggest that if ANSYS is going to support this (see message by Bob Weathers Re: SELECT Criteria CORRECTION), they should generalize it to include lines and keypoints (which can also be meshed) as well as allowing true 'reselection' capability to be compatible with other selection commands. (What I wrote only selects from the full set).
Two thoughts that came to mind as I wrote it: 1. Does ANSYS allow macro writers to query whether an argument passed to a macro is a character or real? 2. How does one query the maximum or total number of a defined entity (e.g. areas) without changing the current state of selection? The *GET command only seems to access number of selected entities. I know a why around it (saving and restoring selection with components), but it is not very "elegant."
Tony
! SelMshd, Type, Entity ! Type= 0 or 1, to select meshed (default) or unmeshed entities, respectively ! Entity= 0 or 1, for areas (default) or volumes, respectively ar36='eq' *if,arg1,eq,1,then ar36='gt' *endif ar34='AREA' ar35='A' *if,arg2,eq,1,then ar34='VOLU' ar35='V' *endif %ar35%SEL,'all' *get,ar32,%ar34%,0,'COUNT' ar31=0 *do,ar30,1,ar32 *GET,ar31,%ar34%,ar31,'NXTH' *get,ar33,%ar34%,ar31,'ATTR','NELM' *if,ar33,ar36,0,then %ar35%SEL,'U',%ar34%,,ar31 *endif *enddo
Dr. Tony Artiles, Technology Development Staff Consultant Flowserve Corporation, Fluid Sealing Division 2100 Factory St., Kalamazoo MI 49001-4163 (616)226-3641 fax: (616)226-3417 e-mail: TArtiles@f... http://www.flowserve.com
> -----Original Message----- > From: John Swanson [SMTP:John.Swanson@a...] > Sent: Friday, January 15, 1999 2:38 PM > To: 'xansys@o...' > Subject: [xansys] Re: SELECT Criteria
> From: John Swanson
> I believe this forum had an INQUIRE function some time ago which > would return the number of > elements in an area or volume. If the number is zero, you can assume > the area/volume is unmeshed. > John.Swanson
> > -----Original Message----- > > From: Weathers, Bob [SMTP:bweathers@t...] > > Sent: Friday, January 15, 1999 10:26 AM > > To: 'xansys' > > Subject: SELECT Criteria
> > I have a need to select/unselect items (volumes & areas) that are > > already meshed. Don't think there's a command for it but I could be > > wrong - someone let me know if the command already exists.
> > If no command exists and others feel it would be useful, a suggested > > format for ANSYS is:
> > *SEL, Type, MSHD
> > Bob Weathers > > bweathers@t... > > (608)787-2729