SWVB101
Mechanical
- Jun 25, 2003
- 85
In SolidWorks (SW01+)...
If you record a macro and click:
View>Hide All Types
Then open the macro, it shows this command:
Part.ViewDispHideAll
But if you try to use that command in a VB program (or even try to run the macro that you recorded), it says that the command does not exist (object does not support the method)
If you open up the API help file it lists the following methods:
ViewDispOrigins
ViewDispRefaxes
ViewDispRefplanes
ViewDispRefPoints
ViewDispTempRefaxes
But those do not include sketches or several other types...
Is there a workaround for this, or am I just doing something wrong, or What ???
I need to hide all sketches, origins, axes, and everything but the Actual Model Geometry.
The reason is... I am trying to write a program to automate converting (Sheet Metal) Part Models to DXF drawings to use to nest parts for NC Programming
Basically I open a Part file, create a blank DrawingDoc, and create a view with a command such as:
Drawing.CreateFlatPatternViewFromModelView2 _
ModelName:=Part.GetTitle, _
configName:=Part.GetActiveConfiguration().Name, _
locX:=0, _
locY:=0, _
locZ:=0, _
hideBendLines:=True
Which creates the flat pattern view of a model
Then I tried adding this to hide the other types...
Drawing.ViewDispHideAll
The others commands work, but they toggle the current state of each type. So if you say:
Drawing.ViewDispOrigins
Drawing.ViewDispRefaxes
Drawing.ViewDispRefplanes
Drawing.ViewDispRefPoints
Drawing.ViewDispTempRefaxes
some types might actually get turned on instead of off.
Any help on this would be MUCH appriciated.
Thanks,
Josh
When dealing with computers, there are 10 things you need to know: one, zero, and the rest is Binary.
-Josh S
If you record a macro and click:
View>Hide All Types
Then open the macro, it shows this command:
Part.ViewDispHideAll
But if you try to use that command in a VB program (or even try to run the macro that you recorded), it says that the command does not exist (object does not support the method)
If you open up the API help file it lists the following methods:
ViewDispOrigins
ViewDispRefaxes
ViewDispRefplanes
ViewDispRefPoints
ViewDispTempRefaxes
But those do not include sketches or several other types...
Is there a workaround for this, or am I just doing something wrong, or What ???
I need to hide all sketches, origins, axes, and everything but the Actual Model Geometry.
The reason is... I am trying to write a program to automate converting (Sheet Metal) Part Models to DXF drawings to use to nest parts for NC Programming
Basically I open a Part file, create a blank DrawingDoc, and create a view with a command such as:
Drawing.CreateFlatPatternViewFromModelView2 _
ModelName:=Part.GetTitle, _
configName:=Part.GetActiveConfiguration().Name, _
locX:=0, _
locY:=0, _
locZ:=0, _
hideBendLines:=True
Which creates the flat pattern view of a model
Then I tried adding this to hide the other types...
Drawing.ViewDispHideAll
The others commands work, but they toggle the current state of each type. So if you say:
Drawing.ViewDispOrigins
Drawing.ViewDispRefaxes
Drawing.ViewDispRefplanes
Drawing.ViewDispRefPoints
Drawing.ViewDispTempRefaxes
some types might actually get turned on instead of off.
Any help on this would be MUCH appriciated.
Thanks,
Josh
When dealing with computers, there are 10 things you need to know: one, zero, and the rest is Binary.
-Josh S