Why Do Drawings Have 3D Data?
Why Do Drawings Have 3D Data?
(OP)
I am attempting to extract drawing data from a SolidWorks file through the API and have found that Solidworks drawings are stored as 3D objects that can be rotated, etc. Why is this? Does anyone know how I can just get the 2D drawing information?
Thanks for any help you can give!
Thanks for any help you can give!






RE: Why Do Drawings Have 3D Data?
If all you want is 2D then export it out as a DWG.DXF.
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: Why Do Drawings Have 3D Data?
Best Regards,
Heckler
Sr. Mechanical Engineer
SW2005 SP 2.0 & Pro/E 2001
Dell Precision 370
P4 3.6 GHz, 1GB RAM
XP Pro SP2.0
NIVIDA Quadro FX 1400
Do you trust your intuition or go with the flow?
RE: Why Do Drawings Have 3D Data?
Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP1.1 / PDMWorks 05
ctopher's home site
RE: Why Do Drawings Have 3D Data?
RE: Why Do Drawings Have 3D Data?
Exactly what are you trying to extract? I guess I am confused as to what you are trying to do. Could you please give some more details?
Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
RE: Why Do Drawings Have 3D Data?
2) Click the "Make Drawing from Part/Assembly" icon right next to the Save icon.
3) Press OK to accept the defaults.
4) Left click in the drawing to place the part
5)Double-click on the part to enable the 5 drawing display mode icons that are in the same toolbar as the save icon and the "Make Drawing from Part/Assembly" icon just used. The display modes are: Wireframe, Hidden Lines Visible, Hidden Lines Removed, Shaded With Edges, and Shaded.
My problem is that I can get the data in only the Wireframe, Hidden Lines Visible, and Hidden Lines Removed display modes. The data in the shaded display modes cannot be extracted. Also when exporting DXF/DWG, you can only get the data in wireframe mode. Any texture or material data does not come across. I want to be able to extract the picture that I see in the drawing when in the shade display mode but cannot.
Hope this helps clarify. Again, thanks for the help everyone!
RE: Why Do Drawings Have 3D Data?
Why go thru the dwg steps if you only want a 2D pic extracted? If you are looking to save as DXF, there is not a need for a "solid" view, drawing DXF will only do edges, corners, points, etc.
Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP1.1 / PDMWorks 05
ctopher's home site
RE: Why Do Drawings Have 3D Data?
RE: Why Do Drawings Have 3D Data?
RE: Why Do Drawings Have 3D Data?
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: Why Do Drawings Have 3D Data?
Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP1.1 / PDMWorks 05
ctopher's home site
RE: Why Do Drawings Have 3D Data?
void ProcessViewFromDrawingDoc(IView *pCurrentView)
{
if (pCurrentView == NULL)
return;
HRESULT hr = S_OK;
try
{
BSTR bstrModelName;
BSTR bstrPathName;
IModelDoc2 * pViewModelDoc2;
VARIANT_BOOL bOK = true;
hr = pCurrentView->GetReferencedModelName(&bstrModelName);
hr = pCurrentView->get_ReferencedDocument(&pViewModelDoc2);
pViewModelDoc2->GetPathName(&bstrPathName);
CString path = "C:\\cxr.jpg";
BSTR bstrPath = path.AllocSysString();
long lVersion;
long lOptions;
long lErrors;
long lWarnings;
bool bRetval;
hr = pViewModelDoc2->SaveAs4(bstrPath, swSaveAsCurrentVersion, swSaveAsOptions_Silent,
&lErrors, &lWarnings, &bOK);
}
}
RE: Why Do Drawings Have 3D Data?
Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP2.0 / PDMWorks 05
ctopher's home site
FAQ371-376
FAQ559-1100
FAQ559-1091
FAQ559-716
RE: Why Do Drawings Have 3D Data?
I attempted to rotate the model and take jpg images as I go, but when I do, I get images of the opened drawing instead of the referenced part."
I have an answer for you.
After you rotate the model to the point that you want to make a jpg, press and hold the "alt" button and push the "Print Scrn" button (located next to F12). Then go to Start - all programs - accessories - paint.
Once paint has opened go to edit and click paste.
Then save this image.
Do that for each image you want.
RE: Why Do Drawings Have 3D Data?
Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP2.0 / PDMWorks 05
ctopher's home site
FAQ371-376
FAQ559-1100
FAQ559-1091
FAQ559-716
RE: Why Do Drawings Have 3D Data?