spettitt Posted November 25, 2022 Share Posted November 25, 2022 (edited) Hello, We stock 4 different manufacturers of hoist, including multiple 1T hoists. I am planning to have different symbols pre-configured, as their weights differ and they need to inventorised separately. I plan to put 'EXE', 'LG' or 'Lodestar' in the Manufacturer field of the HoistObjectData record which is attached to the symbol in the RM, and then have a data tag field to pick up the Manufacturer field from that RF. However, the HoistObjectData record seems to not be attached to the hoist once inserted, so the field in the data tag comes up blank? Any other ideas to make this work please? I want to use the new hoist tools, and I don't really want to have to ask everyone in the office to manually attach that record format for all of the hoists they use. Also, for the Connector field, how can I reach a dialog where I can select this from a drop down, rather than typing a value in? Just seems unreliable to type it in if it needs to match other values. Edited November 25, 2022 by spettitt Quote Link to comment
PatW Posted November 25, 2022 Share Posted November 25, 2022 def callback(h): sym = vs.GetRField(h, "BrxHoist", "SymbolUsed") symH = vs.GetObject(sym) if symH: val = vs.GetRField(symH, "HoistObjectData", "Manufacturer") vs.SetRecord(h,"HoistObjectData") vs.SetRField( h, "HoistObjectData", "Manufacturer", val) vs.ForEachObject(callback, "(R IN ['BrxHoist'])") Here is a little scrip which I quickly put together. It attaches the record to each hoist and only fills in the manufactur. Could be done better but I hope this works for you. 1 Quote Link to comment
spettitt Posted November 25, 2022 Author Share Posted November 25, 2022 5 hours ago, PatW said: def callback(h): sym = vs.GetRField(h, "BrxHoist", "SymbolUsed") symH = vs.GetObject(sym) if symH: val = vs.GetRField(symH, "HoistObjectData", "Manufacturer") vs.SetRecord(h,"HoistObjectData") vs.SetRField( h, "HoistObjectData", "Manufacturer", val) vs.ForEachObject(callback, "(R IN ['BrxHoist'])") Here is a little scrip which I quickly put together. It attaches the record to each hoist and only fills in the manufactur. Could be done better but I hope this works for you. Thanks very much. That works well. 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.