Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro: opening part from drawing

Status
Not open for further replies.

Redrum555

Mechanical
Joined
May 9, 2011
Messages
1
Location
RO
Hello,

I'd like to have a piece of code that allow me to open and close a part configuration from the drawing.(I was able to do it the other way around part to drawing but I'm stuck with drawing to part)

(If you wonder why here is the reason:
The user shall have access only to the drawing file and use a textbox to change a dimension that involve conditions on other dimensions. So I need to open the 3d part in order to update the design table and close it right after the update...)
 
Redrum,

This is not how SolidWork or any other 3D CAD program works. It seems to run counter to the purpose of having a 3D CAD program. It also seems that you may be looking for a method of redlining. This can be done in eDrawings or PDF.

Matt Lorono, CSWP
Lorono's SolidWorks Resources & SolidWorks Legion
Follow me on Twitter
 
You need to do this from a drawing view. Get the drawing object, then a sheet, then a view, then get view's referenced part.
 
Just for clarity, here is what I was responding to from the OP: "The user shall have access only to the drawing file and use a textbox to change a dimension that involve conditions on other dimensions. So I need to open the 3d part in order to update the design table and close it right after the update"

In my opinion, the change should be driven from the design library, as this is how SolidWorks functions. If you wish to change the drawing and then manually update the model separately afterwards, it seems to me that you are trying to implement a redline system. The SW drawing doesn't work like that.

To address your actual question, I differ to Tick's comment.

Matt Lorono, CSWP
Lorono's SolidWorks Resources & SolidWorks Legion
Follow me on Twitter
 
Redrum555 are you trying to access the drawing file from some other application besides SWX? If the user has SWX to open the drawing they can just open the part file from there, no?

--
Hardie "Crashj" Johnson
SW 2011 SP 2.0
HP Pavillion Elite HPE
W7 Pro, Nvidia Quaddro FX580

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top