Announcement

Collapse
No announcement yet.

Link Composite

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Link Composite

    I am working with the dreaded Revit file. How do I break link composites?
    Bobby Parker
    www.bobby-parker.com
    e-mail: info@bobby-parker.com
    phone: 2188206812

    My current hardware setup:
    • Ryzen 9 5900x CPU
    • 128gb Vengeance RGB Pro RAM
    • NVIDIA GeForce RTX 4090
    • ​Windows 11 Pro

  • #2
    I've worked with linked Revit files once or twice. I think converting them to Editable Mesh will break the link.

    Comment


    • #3
      no, not in this case
      Originally posted by Drachen View Post
      I've worked with linked Revit files once or twice. I think converting them to Editable Mesh will break the link.
      Bobby Parker
      www.bobby-parker.com
      e-mail: info@bobby-parker.com
      phone: 2188206812

      My current hardware setup:
      • Ryzen 9 5900x CPU
      • 128gb Vengeance RGB Pro RAM
      • NVIDIA GeForce RTX 4090
      • ​Windows 11 Pro

      Comment


      • #4
        There's some "CAD Cleanup" scripts around that do this, You'll have to try a few of them. I can't remember which one worked, but I know I found on on Scriptspot bobby. Convertting the objects doesn't work. I've tried. Unparenting makes them scatter like crazy. Check scriptspot and let me know which worked.
        Colin Senner

        Comment


        • #5
          http://www.scriptspot.com/3ds-max/scripts/cad-cleaner
          or
          http://www.scriptspot.com/3ds-max/scripts/cleaner
          paolo vaja
          www.3d-arch.it

          Comment


          • #6
            I tried those earlier and they toss things in all kinds of directions.
            Bobby Parker
            www.bobby-parker.com
            e-mail: info@bobby-parker.com
            phone: 2188206812

            My current hardware setup:
            • Ryzen 9 5900x CPU
            • 128gb Vengeance RGB Pro RAM
            • NVIDIA GeForce RTX 4090
            • ​Windows 11 Pro

            Comment


            • #7
              They are both the same, correct?
              Bobby Parker
              www.bobby-parker.com
              e-mail: info@bobby-parker.com
              phone: 2188206812

              My current hardware setup:
              • Ryzen 9 5900x CPU
              • 128gb Vengeance RGB Pro RAM
              • NVIDIA GeForce RTX 4090
              • ​Windows 11 Pro

              Comment


              • #8
                no, the second one is a more general cleaner and might be more useful. i use it all the time. shouldnt move anything.

                Comment


                • #9
                  I use the second one all the time, but the first one seems to be the same, or at least I'm not seeing it after I install it.
                  Last edited by glorybound; 17-03-2014, 07:46 AM.
                  Bobby Parker
                  www.bobby-parker.com
                  e-mail: info@bobby-parker.com
                  phone: 2188206812

                  My current hardware setup:
                  • Ryzen 9 5900x CPU
                  • 128gb Vengeance RGB Pro RAM
                  • NVIDIA GeForce RTX 4090
                  • ​Windows 11 Pro

                  Comment


                  • #10
                    do you need to keep the Link? If not export out a .obj then re-import it to a clean file.
                    A bit clunky I know

                    Comment


                    • #11
                      It might be because the imported objects have instanced controllers. Try this:
                      Code:
                      (
                      	clearListener()
                      	
                      	mapped fn unlink obj =
                      	(
                      		if isKindOf obj.parent LinkComposite do
                      		(
                      			obj.transform.controller = copy obj.transform.controller
                      			obj.parent = undefined
                      		)
                      	)
                      	
                      	unlink (getCurrentSelection())
                      )
                      p.s. You need to select all the objects you want to unlink before running the script.
                      Last edited by DanielBrew; 17-03-2014, 05:15 AM.
                      Dan Brew

                      Comment


                      • #12
                        Bobby, I didn't know if you had this fixed, but I found an old script I used to do this back in the day:

                        Run it, it'll be under "ColinScripts" see if that works for you.


                        It acts on your current selection, so Ctrl+a to select all your scene to fix linkcomposites.


                        Code:
                        macroScript DWG_cleanup
                        Category: "ColinScripts"
                        Tooltip: "Clean DWG import-ColinEdit"
                        Icon:#("Particles",1)
                        /*
                        by Jon Seagull, 2005
                        scripts@jonseagull.com
                        uses some code from a macroscript called transform_unique by Yves Adam
                        
                        
                        Acts on current selection, and:
                        
                        
                        Removes bylayer wirecolors
                        Removes any white wirecolors (changes to layer color, or to orange if layer is also white)
                        Removes Block/Style Parents
                        Condenses selection to a single new layer
                        */
                        (
                        	
                        --collect objects
                        --objs = for i in selection where ((try(i.wirecolor)catch(undefined))!= undefined) collect i
                        -- Colin's Edit
                        max create mode
                        disableSceneRedraw()
                        objs = for i in selection where ((isProperty i #wirecolor) != false) collect i
                        
                        
                        --make new layer
                        theLayer = Layermanager.newlayer()
                        
                        
                        st = timestamp()
                        for i in objs do
                        (
                        	--transform unique
                        	i.transform.controller = prs()
                        	--unlink block children
                        	if classof i.parent == LinkComposite do i.parent = undefined
                        	
                        	
                        	--remove bylayer wirecolors
                        	i.colorbylayer = false
                        	i.wirecolor = if i.layer.wirecolor != white then i.layer.wirecolor \
                        					else if i.wirecolor != white then i.wirecolor \
                        					else orange
                        				
                        	--assign to new layer
                        	theLayer.addnode i
                        )
                        --delete blocks
                        for i in objs where (classof i == LinkComposite) do delete i
                        format "% ms\n" (timestamp()-st)
                        max hide selection
                        enableSceneRedraw()
                        )
                        Colin Senner

                        Comment


                        • #13
                          I'll try, thanks!
                          Bobby Parker
                          www.bobby-parker.com
                          e-mail: info@bobby-parker.com
                          phone: 2188206812

                          My current hardware setup:
                          • Ryzen 9 5900x CPU
                          • 128gb Vengeance RGB Pro RAM
                          • NVIDIA GeForce RTX 4090
                          • ​Windows 11 Pro

                          Comment


                          • #14
                            I get an error:

                            --Runtime error: Cannot set matrix3 property: controller
                            Bobby Parker
                            www.bobby-parker.com
                            e-mail: info@bobby-parker.com
                            phone: 2188206812

                            My current hardware setup:
                            • Ryzen 9 5900x CPU
                            • 128gb Vengeance RGB Pro RAM
                            • NVIDIA GeForce RTX 4090
                            • ​Windows 11 Pro

                            Comment


                            • #15
                              change the line:

                              i.transform.controller = prs()


                              to

                              try(i.transform.controller = prs()) catch()
                              Colin Senner

                              Comment

                              Working...
                              X