Michael Gilbert Posted August 15, 2023 Share Posted August 15, 2023 I have some old drawings from way back done in 11.5. Walls have different thicknesses but all have a cavity. Have been messing around for hours with no success. (Have no time to delve into scripting except about every other year!) Can anyone suggest a VS that selects all walls - below is my attempt: PROCEDURE RemoveCavitiesForObject(hObject : HANDLE); BEGIN Select(Obj(INSYMBOL (T=WALL))); END; PROCEDURE DeleteCavitiesInObjects; VAR hObject : HANDLE; BEGIN { Obtain handles of the objects you want to target } hObject := GetCustomObject('INSYMBOL (T-WALL'); { Call the RemoveCavitiesForObject procedure for each object } RemoveCavitiesForObject(hObject); END; RUN(DeleteCavitiesInObjects); Quote Link to comment
0 cberg Posted August 15, 2023 Share Posted August 15, 2023 I would use the custom selection tool, and select object by type, (which would be walls). But maybe there is a reason not to do it this way? Quote Link to comment
0 Michael Gilbert Posted August 15, 2023 Author Share Posted August 15, 2023 I thought this bit - hObject := GetCustomObject('INSYMBOL (T-WALL'); would select the walls. Because I have not got an understanding of top down - even though read many times the lightbulb has fused. Quote Link to comment
0 Pat Stanford Posted August 15, 2023 Share Posted August 15, 2023 2 hours ago, Michael Gilbert said: I thought this bit - hObject := GetCustomObject('INSYMBOL (T-WALL'); would select the walls. That is only going to select a single wall. And I think you need an "&" between them. I recommend you use the Criteria Builder to generate the criteria. You probably also want to look at ForEachObject. You can put the criteria there once and it will call a sub-procedure you define once for every object the criteria selects. Quote Link to comment
0 Michael Gilbert Posted August 17, 2023 Author Share Posted August 17, 2023 Thanks Pat - will keep digging. Quote Link to comment
Question
Michael Gilbert
I have some old drawings from way back done in 11.5.
Walls have different thicknesses but all have a cavity.
Have been messing around for hours with no success. (Have no time to delve into scripting except about every other year!)
Can anyone suggest a VS that selects all walls - below is my attempt:
PROCEDURE RemoveCavitiesForObject(hObject : HANDLE);
BEGIN
Select(Obj(INSYMBOL (T=WALL)));
END;
PROCEDURE DeleteCavitiesInObjects;
VAR
hObject : HANDLE;
BEGIN
{ Obtain handles of the objects you want to target }
hObject := GetCustomObject('INSYMBOL (T-WALL');
{ Call the RemoveCavitiesForObject procedure for each object }
RemoveCavitiesForObject(hObject);
END;
RUN(DeleteCavitiesInObjects);
Link to comment
4 answers to this question
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.