solidworks >> Fixing all components in imported step file

by solid steve » Thu, 16 Feb 2006 19:12:58 GMT

Has anyone created a macro that can fix, as in not float, all parts in
all subassembly's
I have a step file with about 1000 parts and 50 subassembly's

steve


solidworks >> Fixing all components in imported step file

by TOP » Thu, 16 Feb 2006 19:27:51 GMT


You might start by searching the newsgroup. This has been discussed
before.

solidworks >> Fixing all components in imported step file

by solid steve » Thu, 16 Feb 2006 19:39:23 GMT

I did but for some reason fix and fixing are very popular terms in this
group :-)

steve

solidworks >> Fixing all components in imported step file

by Wayne Tiffany » Thu, 16 Feb 2006 21:26:26 GMT

I have one that I use especially for imported models that goes through and
fixes all parts. Email me and I will send it to you.

Or, you can go to http://kcswug.com/programs/macros/ and find fixall.swp in
the list.

WT





*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

solidworks >> Fixing all components in imported step file

by solid steve » Thu, 16 Feb 2006 22:15:17 GMT

Hi Wayne

Thanks for your help, but I must be doing something wrong, with the top
level assy open I run the macro but nothing happens. I am a complete
macro virgin, I keep meaning to give them a bit of time, but always
seem to busy.


steve

solidworks >> Fixing all components in imported step file

by Wayne Tiffany » Thu, 16 Feb 2006 22:23:22 GMT

Hmmm, I just tried it with SW2006, opened an assy, ran the macro, and all
parts are now fixed. Do you get any error messages? What version of SW are
you on?

WT





*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

solidworks >> Fixing all components in imported step file

by Devon T. Sowell » Thu, 16 Feb 2006 22:24:51 GMT

Try this:

'
******************************************************************************
'FixAll
'Devon T. Sowell, 3-D Design Solutions, www.3-ddesignsolutions.com, 760
809-9046
'
******************************************************************************
Option Explicit
Dim swApp As Object
Dim AssyDoc As Object
Dim Configuration As Object
Dim Part As Object
Dim Component() As Object
Dim RootComponent As Object
Dim Child As Object
Dim i, ChildCount As Integer
Dim retval As Boolean
Dim AssyName As Variant
Const swDocASSEMBLY = 2

Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set AssyDoc = swApp.ActiveDoc ' Current document
If (AssyDoc.GetType <> swDocASSEMBLY) Then Exit Sub ' Make sure this is an
assembly

AssyName = AssyDoc.GetTitle 'Current Assy Name
If InStr(1, AssyName, ".") Then
AssyName = Left$(AssyName, InStr(1, AssyName, ".") - 1) 'Strip off
.SLDASM if its there
End If

' Find the Root Component
Set Configuration = AssyDoc.GetActiveConfiguration()
Set RootComponent = Configuration.GetRootComponent()

' Get list of children
Component = RootComponent.GetChildren

ChildCount = UBound(Component) + 1
For i = 0 To (ChildCount - 1) ' For each Child in this subassembly
Set Child = Component(i) ' Get Child component object
retval = AssyDoc.SelectByID(Child.name2 & "@" & AssyName, "COMPONENT",
0, 0, 0) ' Select it
AssyDoc.FixComponent ' Fix it
Next i
End Sub

solidworks >> Fixing all components in imported step file

by Wayne Tiffany » Thu, 16 Feb 2006 22:29:53 GMT

Interesting - same code that I have.

WT







*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

solidworks >> Fixing all components in imported step file

by Bigbear » Fri, 17 Feb 2006 01:18:53 GMT

How does one search the newsgroup? I am using Outlook Express as the reader
and can see that there are about 60000 mesages available that I have not
read (including all the headers I have downloaded. Can one search the
newsgroup without downloading all those headers?

TIA

bigbear

solidworks >> Fixing all components in imported step file

by FrankW » Fri, 17 Feb 2006 01:24:20 GMT

goto dejanews

solidworks >> Fixing all components in imported step file

by Bigbear » Fri, 17 Feb 2006 01:43:33 GMT

Thanks Frank
That seems to work well!

Similar Threads

1. Importing IGES Files...Use STEP

Ask your Catia customer to use the Catia v4 STEPOUT function to provide STEP
files, Iges will not work but the STEP does.


"John Eric Voltin" < XXXX@XXXXX.COM > wrote in message
news:GXfjc.27020$ XXXX@XXXXX.COM ...
> I have a group of six IGES files that were created in CATIA and won't
import
> into SolidWorks 2004.  When I try to import any of these IGES files,
> SolidWorks produces the following error message after working for only a
few
> seconds.
>
>   Unable to read IGES file.  File was truncated or contains invalid data.
>
> I suspect the IGES files contain entities that are not supported by
> SolidWorks since I can view part of the IGES geometry in other programs.
> Unfortunately, none of the programs I have can load all of the geometry,
so
> I can't export it in another format.
>
> I am currently exploring my options and was wondering if anyone can make a
> suggestion for a translation program or service bureau.
>
> -- 
>  - John
>
> John Eric Voltin
> Mechanical Engineer
> Agile Technology, Inc.
>  XXXX@XXXXX.COM 
> 512-633-0394
>
>


2. Import .step file as a Solid

3. Importing a Step file from IDEAS

I have received a step file of a large assembly that was created in 
IDEAS Master Series 9.

When I import the assembly into SWX, the file names of the various 
components appear to be a part description instead of a part number.

BUT, if I use ProDesktop Express, the imported component file names are 
the real part numbers.

I would use ProD to import the step, save as a step, and then import 
into SWX, but that creates some other (severe) problems.

Any thoughts or ideas?  I want the file names of the imported components 
to be the part number and not the description.  I am surprised to see 
that the imported component names vary between SWX and ProD.  Is there 
some import or export setting that could be causing this?

4. Importing step files

5. Importing .STEP Files

Hello,

I have a couple of step files that open as surfaces models. What I'm looking
for is for them to open as solid models and have been told it is possible by
lowering the relative accuracy - Tried this several ways but the models always
open w/ a higher relative accuracy then what I've preset
Is there more than one config setting that can effect the default relative
accuracy?

Thanks-

6. Batch import of STEP files

7. CAD Microstation import IGES, STEP or SAT?

Can the latest version of Microstation import IGES, STEP or SAT files.

-Peter

8. Step Import