|
macro for part elevations?
is it possible to gather coordinate information in a drawing by picking a surface in a view, return one value and insert it into text? we often create drawings for mock-up models that require only one view with elevation dimensions (see attached). currently, we transfer dimensions from one view to another which can introduce errors. multi-view drawings are not an option for this particular application.
i can create some basic macro programming but i haven't been able to make much headway with where to start on this. any help would be much appreciated- thanks in advance!
john summers, cswp
system:
sw 2009 sp2.0
dell precision 490
intel xeon 5160@3.00 ghz, dual core
nvidia fx-4600, 6.14.11.6265 driver, dual monitors
windows xp 32 w/ 4 gig memory, 3 gig switch
is it possible to gather coordinate information in a drawing by picking a surface in a view, return one value and insert it into text?
not quite sure i follow... what coordinates are you after? you select a surface so do you want all points on a surface boundary, or is there a sketch associated with that surface and instead you want to get some information from that sketch somewhere, or is it something else entirely?
hey luke, thanks for the reply!
what i am looking for is i would like to return the y coordinate for the part surface. to clarify, the surfaces that are shown in the previous image are always planar to the top plane at some distance- i need this dimension from the top plane (the y axis from the origin) to be transfered to text and placed anywhere on the surface in the drawing. i experimented with some code to gather coordinates in the part model but it doesn't return the correct values in the drawing.
hope this helps to clarify and clear things up!
john summers, cswp
system:
sw 2009 sp2.0
dell precision 490
intel xeon 5160@3.00 ghz, dual core
nvidia fx-4600, 6.14.11.6265 driver, dual monitors
windows xp 32 w/ 4 gig memory, 3 gig switch
does this macro do what you need? the notes it creates are just text, not linked dimensions.
let me get this right first. are you working on purely a drawing here i presume?
your problem will be with model-space coordinates and translating from an actual 3d model position to a relative drawing-space coordinate. i had absolute nightmares doing a program for a client not so long ago to get point locations from a drawing, its far far more tricky than simply saying here is my position. you have to use transform and translation matrix, space conversions and a few more tricks depending on the conditions.
how important is this task?
hi josh,
this is exactly what i was looking for!!! it would be nice if it were parametric, but this will do the trick. thanks!!!
john
john summers, cswp
system:
sw 2009 sp2.0
dell precision 490
intel xeon 5160@3.00 ghz, dual core
nvidia fx-4600, 6.14.11.6265 driver, dual monitors
windows xp 32 w/ 4 gig memory, 3 gig switch
luke,
this task is pretty important to us- otherwise, we have to manually transfer every dimension to a text box and type it in. take a look at the macro that josh posted- it works great once you understand how it works (took me a few minutes to figure out the "select other" that it was looking for). i may alter it to be more useful for our needs, but it does the trick!
john summers, cswp
system:
sw 2009 sp2.0
dell precision 490
intel xeon 5160@3.00 ghz, dual core
nvidia fx-4600, 6.14.11.6265 driver, dual monitors
windows xp 32 w/ 4 gig memory, 3 gig switch
john,
glad it fit your needs. there's certainly plenty of room for it to be improved - ui... error trapping... even comments!
i'll get you eh steve, if it's the last thing i dooooo!
john,
what you are doing is just getting 2d drawing points, not actual 3d model points into model space coordinates so what you are asking is very basic it is just a case of getting the selected points as the example macro does. nothing really to comment on as its just a case of getselectionpoint2 and however you want to go about that. |
|