Message 1 of 1
Non-Uniform Scaling Sample

Not applicable
09-10-2003
08:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There was a question posted in the
autodesk.inventor.7 group titled "Flatten an isometric view of a model".
You can check out that thread if you want, but Udaya Gunasena (from Autodesk)
posted a proposed solution to that problem. Part of the solution involved
the ability to create a derived part with a non-uniform scale. Because of
some limitations, (primarily that you can't derive sketches), it was decided to
only expose this through the API for the time being. Below is a small
sample program that demonstrates creating a derived part with a non-uniform
scale. To run it, have a part open that you want to derive the other
part into. You'll also want to change "C:\Temp\Part1.ipt" to the filename
of the part you want to derive.
autodesk.inventor.7 group titled "Flatten an isometric view of a model".
You can check out that thread if you want, but Udaya Gunasena (from Autodesk)
posted a proposed solution to that problem. Part of the solution involved
the ability to create a derived part with a non-uniform scale. Because of
some limitations, (primarily that you can't derive sketches), it was decided to
only expose this through the API for the time being. Below is a small
sample program that demonstrates creating a derived part with a non-uniform
scale. To run it, have a part open that you want to derive the other
part into. You'll also want to change "C:\Temp\Part1.ipt" to the filename
of the part you want to derive.
Public Sub CreateDerived()
Dim oDoc As PartDocument
Set oDoc =
ThisApplication.ActiveDocument
Dim
oDef As DerivedPartCoordinateSystemDef
Set oDef =
oDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.CreateCoordinateSystemDef("C:\Temp\Part1.ipt")
oDef.BodyAsSolidBody = True
oDef.IncludeBody =
True
Call oDef.SetScale(1, 1, 0.05)
Dim oDerPart As
DerivedPartComponent
Set oDerPart =
oDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.Add(oDef)
End
Sub
--
Brian Ekins
Developer Technical Services,
Autodesk
Discussion Q&A:
href="http://www.autodesk.com/discussion">http://www.autodesk.com/discussion
Dim oDoc As PartDocument
Set oDoc =
ThisApplication.ActiveDocument
Dim
oDef As DerivedPartCoordinateSystemDef
Set oDef =
oDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.CreateCoordinateSystemDef("C:\Temp\Part1.ipt")
oDef.BodyAsSolidBody = True
oDef.IncludeBody =
True
Call oDef.SetScale(1, 1, 0.05)
Dim oDerPart As
DerivedPartComponent
Set oDerPart =
oDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.Add(oDef)
End
Sub
--
Brian Ekins
Developer Technical Services,
Autodesk
Discussion Q&A:
href="http://www.autodesk.com/discussion">http://www.autodesk.com/discussion