Jump to content

Samuel Derenboim

Member
  • Posts

    359
  • Joined

  • Last visited

Reputation

77 Excellent

1 Follower

Personal Information

  • Occupation
    Architect
  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Update 4 All parameters functioning properly except 1 element - How does one reset count when a condition ends? I.E. If S3 changes then N1 = 1 Procedure NumberThem; CONST Rec='!CDA-EnergyTabular'; Fld='ID_Count'; typ='Obj.Type'; dir='Orientation'; VAR H1, layhand: Handle; N1,N2: Integer; S1,S2,S3,S4,layName: String; Procedure Execute(Hd1:Handle); BEGIN layhand:= GetLayer(hd1); layName := GetLName(layHand); S2:= GetRField(Hd1,Rec,typ); S4:= GetRField(Hd1,Rec,dir); If layName='Cellar Areas' then S3:='0'; If layName='1st Fl. Areas' then S3:='1'; If layName='2nd Fl. Areas' then S3:='2'; If layName='3rd Fl. Areas' then S3:='3'; If layName='4th Fl. Areas' then S3:='4'; If layName='5th Fl. Areas' then S3:='5'; If layName='Roof Areas' then S3:='+'; If S2='Door' then S2:='D'; If S2='Window' then S2:='W'; If S2=' Wall' then S2:='P'; If S2='Cwall' then S2:='CW'; If S2='Slab' then S2:='SL'; If S2='Roof' then S2:='RF'; If S4= 'East' then S4:='E'; If S4= 'West' then S4:='W'; If S4= 'North' then S4:='N'; If S4= 'South' then S4:='S'; If S4= 'Horizontal' then S4:='H'; S1:=Concat(S4,S2,S3,N1); SetRField(Hd1, Rec, Fld, S1); N1:=N1+1; End; BEGIN N1:=1; ForEachObject(Execute, ((R IN [Rec]))); End; Run(NumberThem);
  2. Update 3 : Got Layers working. How do I add leading zeros? Procedure NumberThem; CONST Rec='Test'; Fld='ID'; typ='Type'; VAR H1, layhand: Handle; N1: Integer; S1,S2,S3,layName: String; Procedure Execute(Hd1:Handle); BEGIN layhand:= GetLayer(hd1); layName := GetLName(layHand); S2:= GetRField(Hd1,Rec,typ); If layName='cellar' then S3:='0'; If layName='1st floor' then S3:='1'; If S2='Door' then S2:='D'; If S2='Window' then S2:='W'; If S2='Wall' then S2:='P'; If S2='Curtainwall' then S2:='CW'; S1:=Concat(S2,S3,N1); SetRField(Hd1, Rec, Fld, S1); N1:=N1+1; End; BEGIN N1:=1; ForEachObject(Execute, ((R IN [Rec]))); End; Run(NumberThem);
  3. update 2: For some reason GetLName(HD1) not working - but the script compiles. My understanding is - it's supposed to get the layer name and then convert it to a string to See if it equates to S3 right? or does it need a separate handle? Procedure NumberThem; CONST Rec='Test'; Fld='ID'; typ='Type'; VAR H1: Handle; N1: Integer; S1,S2,S3: String; Procedure Execute(Hd1:Handle); BEGIN S2:= GetRField(Hd1,Rec,typ); If S2='Door' then S2:='D'; If S2='Window' then S2:='W'; If S2='Wall' then S2:='P'; If S2='Curtainwall' then S2:='CW'; If GetLName(Hd1)='cellar' then S3:='0'; If GetLName(Hd1)='1st floor' then S3:='1'; S1:=Concat(S3,S2,N1); SetRField(Hd1, Rec, Fld, S1); N1:=N1+1; End; BEGIN N1:=1; ForEachObject(Execute, ((R IN [Rec]))); End; Run(NumberThem);
  4. @Pat Stanford Awesome! Thank you for the hint. For some reason I thought the field needed to be an integer so I assigned it as such, and it kept getting an error, until i switched it to text - at which point it worked out beautifully. Regarding the Pseudocode 🙂 The property that describes the object as 'window' 'door' 'curtainwall' 'wall' is located in another field called 'type' My question: How does GetName(GetParametricRecord(hd1) know to look into the record called 'type' in order to do : If GetName(GetParametricRecord(Hd1))='Door' then S2:='D'; Do i specify an additional constant for type? ******PROGRESS BELOW*********** Procedure NumberThem; CONST Rec='Test'; Fld='ID'; typ='Type'; VAR H1: Handle; N1: Integer; S1,S2: String; Procedure Execute(Hd1:Handle); BEGIN S2:= GetRField(hd1,Rec,typ); If S2='Door' then S2:='D'; If S2='Window' then S2:='W'; If S2='Wall' then S2:='P'; If S2='Curtainwall' then S2:='CW'; S1:=Concat(S2,N1); SetRField(Hd1, Rec, Fld, S1); N1:=N1+1; End; BEGIN N1:=1; ForEachObject(Execute, ((R IN [Rec]))); End; Run(NumberThem);
  5. @Pat Stanford thank you again for your consideration ! Let me clarify some of the questions you asked about in both posts The intention was to rewrite the information in the ID's if the amount of objects increased or decreased, so it would be easier to over-write or 'clear' the original contents of the ID field. This is why I thought the first process needs to 'clear' the ID Fields that way it 're'finds the closest object to the origin, and rewrites to all objects in the document. Looking at the code, the conditional statement this would only be done if the fields were : IDcount:=1; B2:=False; While B2 = False do Begin TrackObjectN(0, CallBack, H1, X1,Y1); If H1 <> Nil then Begin SetName(ID_Handle,Num2Str(0,IDcount)); IDcount:=IDcount+1; Looked like it only did the operation if H1 was nil, so i figured by the same logic this script had to work in a similar way. If that was the case, the contents would be cleared, the conditional statement would 're' find all objects with records that have that handle set to nil and the apply the conditions of redoing the ID's for every object again. Sorry if It didn't make sense in my earlier post! Newbie here! The version that is displayed above is a combination of conditions that make each object unique. You're right in saying that these conditions vary based on 1. Direction (East, West, South, North) 2. Object Type (D=Door, W=Window, P=Partition / Wall, CW= Curtainwall 3. Every floor has a unique leading number. I.E. Cellar = 0, 1st Floor=1, 2nd Floor=2 4. Every Object ID Gets reset when it meets a different object, and object ID's have double digits for the purposes of quantity i.e. = the 1st door on the North Face on the 2nd floor could be indicated as DN101 For the purposes of the questions I wanted to start simple - with only counting the objects. Since datatags and worksheets can concatenate information, I figured I wouldn't make the script too complicated. In this case, we can just simply do the ID's = which are dual decimal numbers, that way there can be more objects than 10 on a face per floor. All i need to do is reset count as soon as a different object is engage. I.E. - Let's say I reach number 5 on walls, the count would be reset on a door which would be ND001 instead of ND006 (based on the original count). If it is too complex, we i can work with just a simple count for now. Here is a breakdown of the worksheet. Note that i wasn't consistent in my use of the object type in my worksheet cells...I used W to represent walls until I ran into Windows, after which I used P to represent walls/partitions and W to represent windows. The error here is already mine! Generally The objects are in 3d like so : But the Diagrams can be viewed in 2d and in 3d. It isn't really important how we get the Id's, so long as it starts counting from somewhere, and each ID is unique / sequential. It is for the plan examiner to cross reference the graphical drawing with the worksheet - for that particular object / condition. Leading 0 is just the level. In reality the ID is just a 2 digit number Oh wow, I didn't know ctrl activated the popup, Now that conditional statement is understandable! Just to get on the same page : If Command then N1:=IntDialog('Enter Number for this Object.', Num2Str(0,N1)); <= the command function activates the use of apple and CTRL for the keyboard, is this correct? Question 2: what is the purpose of using the TrackObjectN Function? TrackObjectN(0, CallBack, H1, X1,Y1,Z1); ***update*** - Is this function used to click on the object? (starting to get the feeling that's the click here operation) Question 3: Why did you use a boolean condition here? B1, B2: Boolean;....and why are there two booleans? only one is being called out later on. maybe I don't see it, but is B1 Boolean inherently used somewhere to represent N1 in your script? Sorry for the long winded explanation! Grateful for your insight into the matter!!!!
  6. @Pat Stanford Please don't laugh, I made a rough outline of the procedure for the franken-script. Can you please tell me if i'm off, how far i am off, and should i even bother? 😂 Procedure SetObjectID; Var IDhand: Handle; X1,Y1, X2,Y2: Real; IDcount: Integer; B1,B2: Boolean; Procedure GetIDcount(idhand:handle) Begin {ID Count Procedure} 1 delete all object id's with (this record,this field) {this resets all id's for the Record/ID so that procedure below can begin} 2 pick object closest to origin, set (this field, this record) closest to 0 @ X, Y, or Z in model space or object closest to origin x,y on screen 3 Set (Record, ID) to 1 from picked object 4 {if any objects that have id = 1 while all others do not have any information inside } then setrfield for all objects from handle IDcount with IDcount being equal to IDcount+1 (or other count formula) The conditions were extrapolated from another script that you wrote shown in the above comment 🙂 Begin IDcount:=1; B2:=False; While B2 = False do Begin TrackObjectN(0, CallBack, H1, X1,Y1); If H1 <> Nil then Begin SetName(ID_Handle,Num2Str(0,IDcount)); IDcount:=IDcount+1; End Else B2:=True; End; Begin {conditions for all objects to be revised} ForEachObject(GetIDCount, ((R IN ['Record'])) ) END; Run(SetObjectID)
  7. Hi Pat, thank you for your response! When objects are added, what would one do to auto re calculate the incrementing value? Would it be done in the sheetlayer viewport? or would it be done in the worksheet? specifically if one was to do it by 'criteria' I also noticed a script your wrote in a different thread (sorry in advance 🙂 ) Question is : 1. What parameter should i choose to change a field in a record rather than the name of the object (i see only SetName) 2. What is Hd1? is this a rectangle reference? 3. Does the application quit if and only if the object doesn't have a number? 4. For some reason when running this script I still don't get a popup or dialog asking to enter the name of the object Procedure PickAndName; Var H1: Handle; X1,Y1,Z1, X2,Y2: Real; N1: Integer; B1, B2: Boolean; Function CallBack(Hd1:Handle):Boolean; Begin If GetType(Hd1)=3 then CallBack:=True; End; Begin N1:=1; B2:=False; While B2 = False do Begin TrackObjectN(0, CallBack, H1, X1,Y1,Z1); If H1 <> Nil then Begin If Command then N1:=IntDialog('Enter Number for this Object.', Num2Str(0,N1)); SetName(H1,Num2Str(0,N1)); N1:=N1+1; End Else B2:=True; End; End; Run(PickAndName);
  8. I don't know if the title was understandable enough, however, here i will try to describe what I am looking to do In the case below I have polygons / rectangles that have a record, story, and object type. Essentially they need a unique id / number in order for a plan examiner to cross reference that id with the table below. 1. Create a worksheet script that changes ID count (as shown below) based on a few parameters and changes a field called ID in a record. (if that is possible). I know it would either be a record callout or a script callout, so i'm not really sure how to do this. 2. Technically the record count can be done without a worksheet now that i am thinking about it because of the unique parameters of each object, story, and count would be able to cover all objects. Note : the reason the ID is a separate field is because it used for the purposes of a datatag showing graphically what object that is (2nd image below) 3. The reason for this request is because using the data-tag count system does not work - it counts all tags not only in the sheet layers but also in the view ports. (unless there is a work around I am not aware of?)
  9. As the post suggests - this bug has a huge implication on construction documents that use worksheets in design layer viewports. Worksheets resize automatically when referenced in a design layer viewport, cropping them makes them disappear. Beware of transitioning to VW2022!!! This is by far the worst update in the last 4 years that i've experienced unfortunately, and its implications have been disastrously far reaching. A bug has already been submitted, but i am disappointed that it wasn't addressed in the latest service pack. I will try recreating a new file to see if there is something wrong with the file itself because it was originally upgraded from 2021. But this is pretty bad! Update 1 - Upon placing in sheet layer viewport - worksheet keeps disapearing. Is this a worksheet issue? or a rendering issue?
  10. There are many occasions when a worksheet needs to be resized to fit the viewport, but it cannot when it is fully expanded. Instead of creating a separate design layer and reference worksheets within the viewport, I wanted ask for a new feature - the ability to crop worksheets like images. This would be extremely helpful in resizing and reproducing similar information with copies of the worksheet in cropped formats. Their reference remains the same, but the ability to display selective information would be extremely useful.
  11. Hi All, I'm rendering a worksheet referenced in a viewport located on a sheetlayer. When printing pdf, it updates the contents and successfully shows the contents of the viewport when exported, however, in realtime, it does not show the worksheet. Also, VW has a tendency to resize the worksheet as well. It requires a copy and paste - to retain the same size in the design layer viewport. Viewport Referencing design layer. Sheet Layer
  12. image by datavis ('') - does not properly work, or maybe i'm doing something wrong? Currently display by datavis is enabled, and imagebydatavis callout out referencing datavis name (2nd image). Also, if i change the datavis name to another data visualization - nothing changes.
  13. They mentioned on the mac it had disappeared. I'm guessing this is an OpenGl bug - where opengl is still predominant on the windows platform (i presume). It's better than in 2021, so at least that is a good thing. Additionally, 2022 is much speedier in terms of rendering linework than 2021 which is a huge advantage. So i give them the benefit of the doubt, just wanted to give the tech's at the forum the heads up!
  14. From what I understand, Opengl was eliminated on MacOs, however, viewport / sheetlayer geometry ghosting beyond viewport still persistent in VW2022
  15. Thank you for your response ! I agree, a wall type will work very well for almost any situation. The only reason I asked about slabs and roofs was for organizational purposes when creating worksheets to list available wall, roof and slab types in separate worksheets. Is there a node that I would be able to replace the wall type node with a slab type/roof type node instead? This tool is definitely going into my menu marionette commands!!! thank you again
×
×
  • Create New...