ScriptSpot

Forum topic · Scripts Wanted

Script request (150 EUR.): workaround for 3dsMax File Link bug

By 3DV · 2012-04-20

Description

There's a nasty FileLink bug in 3ds Max that has existed since 2004 and has never been fixed. Over the years I've sent several bugreports, steps to reproduce it and have even received confirmation about it being reproduced by Autodesk.. but instead of fixing it, with every release it seems that they only focus on changing stuff that works well..

This is the bug:
When an UVW Map modifier (probably any other modifier too) is applied to a block inside a filelinked AutoCAD DWG, and that block is copied, mirrored or deleted in AutoCAD, filelink 'Reload' fails and scatters and deforms all linked geometry randomly across the scene.

Possible workaround:
Before filelink 'Reload' is used, for each layer and block a temporary box could be drawn in a non-render layer, the modifiers in the stack of each layer and block can be instanced to it's temporary box, and the modifiers of the layers and blocks can then be removed. Then the file can be reloaded, after which all the modifiers can be instanced back from the temporary boxes to the geometry it belonged to (if that still exists after reloading). There might be smarter ways to do it, that's up to the one taking on the challenge.

Offering 150 Euro for a solid workaround. Please drop a message here before starting. I can provide the file/steps to reproduce this bug, so that can be used for testing the script.

Comments (14)

Old post, but problem is still alive

3d-labor · 2015-03-12

Hello,
today I again had to fight with this old problem. In AutoCAD 2015 and MaxDesign 2014. Former, in 2012 I had the problem with the scattered elements. Would be very funny, if I did my work only for fun. But if the client waits for new renderings...
I only redefined some blocks or mirror some of it and MAX crashes during reload.
It is a shame for AutoDESK, that one guy can program a workarround in a short time, while hundreds of AutoDESK programmers...

Same issue

birket · 2014-08-05

I wondered if this script was ever created and was available from anywhere?

barigazy · 2014-08-05

The script is created and sended to requester.

miauu · 2014-08-05

The script was created. Contact with the OP or barigazy.

We have a winner

3DV · 2012-05-15

Barigazy delivered an excellent script providing the needed solution.

It collects all modifiers on temporary objects, the linked files can then be reloaded, after that the modifiers can be restored to the linked blocks.

What Autodesk didn't manage to fix in the past 8 years Barigazy fixed in a couple of hours. Very nice work Barigazy, and thanks a lot! The money is yours, well earned.

barigazy · 2012-05-15

I appreciate your compliment and I'm glad we've completed this simple and also very useful script.
Cheers!

Multiple entries

3DV · 2012-05-15

There are already two scripters who have sent their work.
The best entry will be paid, when decided, I'll post the results here.

3DV · 2012-05-15

Anyone able to help with this?
I'll pay the 150 Euro for a script that can get me started:

Step 1/Script 1:
For all elements with a name that starts with: Block: perform the following
(only one for each unique name, elements without modifiers can be skipped)
- create a temporary box at 0,0,0 with same name as the element, with prefix Temp
- copy the modifiers of the linked element to the new box

Then the filelinked drawing will be reloaded, this doesn't have to be part of the script.

Step 2/Script 2:
- loop over all temporary boxes and if the block with same name still exists, copy the modifiers
- delete the temporary box

kimarotta · 2012-05-15

I sent a message for you.

I look back.

first assignment

barigazy · 2012-05-15

Me to :)

kimarotta · 2012-05-15

Hey Barigazy you are the master...rsrs

barigazy · 2012-05-15

sorry kimarotta, i wrote last night somethin for this request and i forget to send on time. No hard feelings. After all i don't decide
which solution is better.Right?

hey

kimarotta · 2012-05-15

no no man. I admire your work, I am a beginner in the scripts and I need the trouble to develop myself ... lol =]
then I wonder what was the solution.

Thankss

Steps to reproduce the bug

3DV · 2012-04-20

I've reproduced the error on a clean install of Autocad 2012 x64 and 3ds Max 2012 x64:

3ds Max:
1. Create a new scene
2. File Link the Filelink-Bug1.dwg with the following options:
Basic: only 'Auto-smooth adjacent faces' checked
Advanced: Derive AutoCAD primitives by Layer, only 'create helper at origin' checked
3. Apply an UVW Map modifier to block: 3d-woning-C2 (facade of the middle house)

AutoCAD:
1. Open the file Filelink-Bug1.dwg
2. Mirror the block 3d-woning-C2 to make a copy
3. Save the dwg

3ds Max:
1. Reload the file with File Link Manager
2. Now either 3ds Max completely freezes, or it scatters all the linked objects somewhat randomly across the scene.

The file can be downloaded here: http://www.3dv.nl/download/Filelink-Bug1.dwg