Fabrication CADmep™ > CADmep™ Users
Custom data not populating using MPROP
(1/1)
WilliamNY:
Let's say that we have custom data fields that we need to fill with a particular value. These custom data fields are already in every part.
Using MPROP (change multiple item properties), I can change default Fabrication data all day, but it appears that MPROP just doesn't work for custom data - am I missing something here?
The two outcomes I've gotten are this:
* Using Fabrication 2016: I get the "Changes made to the Item require it to be Re-Developed" error and nothing happens. The custom data fields remain blank.
* Using Fabrication 2018: No error message, but nothing happens.
I'd appreciate any advice that anyone can give. Thanks in advance!
Ixath:
Doesn't fix the bug but save the below code to somefilename.cod and run it via EXECUTESCRIPT. Haven't bug tested it or made it foolproof, but it worked the 2 or 3 times I tried it on my end.
--- Code: ---Requires Task.Selection
DIM CustomProp = INPUTBOX("Type the name of the custom property to change. Case sensitive.")
DIM NewProp = INPUTBOX("Enter the text you want to appear.")
DIM i = 1
DIM changeCnt = 0
While i <= Task.Selection.Count
DIM item = task.selection[i]
IF item.customdata[CustomProp] then
item.customdata[CustomProp].value=NewProp
item.update()
changeCNT = changeCNT + 1
END IF
i = i + 1
END while
--- End code ---
WilliamNY:
This functions perfectly as a workaround. Thanks for the tip! I'm astonished that Autodesk doesn't have something to solve this.
cadbyken:
--- Quote from: WilliamNY on Jul 18, 2018, 15:42:33 PM ---This functions perfectly as a workaround. Thanks for the tip! I'm astonished that Autodesk doesn't have something to solve this.
--- End quote ---
They stopped fixing/improving things a while back :o :(
Navigation
[0] Message Index
Go to full version