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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help to modify an existing routine for Acad 2006 Fields

Status
Not open for further replies.

vbcad

Technical User
Jul 12, 2002
159
US
below is some code for a routine that i am trying to modify. it is curently used to zoom all layouts in some drawings. what i would like it to do is got thru the paperspace layouts and update all fields that it encounters. i believe to access the fields it is iacadmtext2 but that is VBA language. how do i get there thru VLA? See the red text below. IS this the line i need to modify?

Code:
(defun update_all_fields	(/ lay layouts *acad* *doc* )
	(vl-load-com)
	(setq	*acad*	(vlax-get-acad-object)
	*doc*	(vla-get-activedocument *acad*)
	layouts	(vla-get-layouts *doc*)
  	)
	(vlax-for lay	layouts ; step through layouts 
	(vla-put-activelayout *doc* lay) ; activate layout 
	(if	(= (vla-get-activespace *doc*) 0) ; If in paperspace 
	(if (= (vla-get-mspace *doc*) :vlax-true); in mspace viewport 
	(vla-put-mspace *doc* :vlax-false) ; inactivate vp 
	) ; endif 
	) ;endif
	[COLOR=red](vla-ZoomAll *acad*)[/color]
	;(vla-zoomextents *acad*)
	)
	)
	(defun c:zal ()
	(update_all_fields)
	(COMMAND "PDMODE" "1")
	)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top