Jump to content

Hoist Manufacturer in Data Tag


spettitt

Recommended Posts

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.

 

image.png.b828904730bbee17074bacfdcb839e5e.png

image.thumb.png.782002dfab3401a00fef70ddb284070b.png

image.thumb.png.49c3c5f04679e5cc8ecf96b282375ba3.png

Edited by spettitt
Link to comment

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.

 

  • Like 1
Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...