DSmith2300 Posted October 24, 2024 Share Posted October 24, 2024 Hi all, Is there any setting to allow me to change objects inside a group to the class of the group, without drilling into the groups individually? ...like selecting dozens (hundreds?) of groups in different classes and make their 'interior' objects conform to those various classes? I have a huge mix of polys and groups of polys all on the same class (imported shapefiles). Pat kindly wrote me script to change them to classes as defined by a record field. V cool. The groups change to those classes, but the polys inside do not. I feel this is a very basic question and surprised that I have not been able to find any help topic nor tick-box or setting to change. Any advice gratefully received. Quote Link to comment
DSmith2300 Posted October 24, 2024 Author Share Posted October 24, 2024 Apologies for wasting anyone's time reading my query. I found this: And it almost helped. It allowed the option to change objects inside groups once more. Unfortunately the script seems to still skate over that nuance, but I'll keep trying. Quote Link to comment
Pat Stanford Posted October 24, 2024 Share Posted October 24, 2024 Which script? It can probably be modified to do all objects and not just groups. Quote Link to comment
DSmith2300 Posted October 31, 2024 Author Share Posted October 31, 2024 Thanks Pat. Procedure ShapeZoneToClass; VAR S1 :String; Procedure Execute(Hd1:Handle); BEGIN S1:=Concat('ZONING-',GetRField(Hd1,'EPI_Land_ZoningRec','SYM_CODE')); SetClass(Hd1,S1); End; BEGIN ForEachObject(Execute,((R IN ['EPI_Land_ZoningRec']))); End; RUN(ShapeZoneToClass); The shapefiles do not come in cleanly and lots of groups exist of broken / open polygons. Many thanks for your help. Quote Link to comment
Jesse Cogswell Posted October 31, 2024 Share Posted October 31, 2024 Change the line reading SetClass(Hd1,S1); to SetClassN(Hd1,S1,TRUE);. This will descend into the groups and apply the new class. 2 Quote Link to comment
DSmith2300 Posted November 11, 2024 Author Share Posted November 11, 2024 On 10/31/2024 at 11:53 PM, Jesse Cogswell said: Change the line reading SetClass(Hd1,S1); to SetClassN(Hd1,S1,TRUE);. This will descend into the groups and apply the new class. Great! Thanks! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.