PLANT 3D ORTHOGRAPHIC DRAWING PLANTORTHOANNOTATE BY COMMAND LINE

PLANT 3D ORTHOGRAPHIC DRAWING PLANTORTHOANNOTATE BY COMMAND LINE

Anonymous
Not applicable
2,495 Views
6 Replies
Message 1 of 7

PLANT 3D ORTHOGRAPHIC DRAWING PLANTORTHOANNOTATE BY COMMAND LINE

Anonymous
Not applicable

Good Day..

 

Looking for help in LISP coding to place all tag number of pipe support in orthographic view.

 

(defun c:BOP (/)
(command "PLANTORTHOANNOTATE" pause "Bottom of Pipe [BOP]")
(princ))
i am using this command but for next support again press Enter i wanted to skip this Enter and Place My Tag Any where as per My choice and Lets Continue the command for Next Support Tag

 

i am using like this

(defun c:SUPPLY (/)

(command "PLANTORTHOANNOTATE" pause "Support Annotation [Tag]" pause "Support Annotation [Tag]")

(princ))

 

but its happen like this

Command: SUPPLY
PLANTORTHOANNOTATE
Command:
Select a component to annotate:
Specify annotation style or [?] <Support Annotation [Tag]>: Support Annotation [Tag]
Specify annotation position [Rotate/disableLeader]:
Select a component to annotate: Support Annotation [Tag]
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Previous/AUto
; error: Function cancelled
Select a component to annotate:
Specify annotation style or [?] <Support Annotation [Tag]>:
Specify annotation position [Rotate/disableLeader]:
Select a component to annotate:

 

Your help in this highly appreciated.

Regards

 

Sachin 

0 Likes
Accepted solutions (1)
2,496 Views
6 Replies
Replies (6)
Message 2 of 7

h_eger
Mentor
Mentor

Dear @Anonymous,

 

This function is not programmable with LISP!

Please use AutoCAD Plant 3D SDK for programming

 

https://www.autodesk.com/developer-network/platform-technologies/autocad-p-id-and-plant-3d

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 3 of 7

jabowabo
Mentor
Mentor
Accepted solution
(defun c:repeatTag (/)
	(while t
		(command "PLANTORTHOANNOTATE" pause "Support Annotation [Tag]" pause "")
	)
(princ))
Message 4 of 7

Anonymous
Not applicable

Thanks to replay on my problem i appreciate your help .

 

once again thanks.

0 Likes
Message 5 of 7

jusea
Participant
Participant

Hello !

Thank you for your advice to the «PLANTORTHOANNOTATE»LISP

 

CODE:

(defun c:repeatTag (/)
(while t
(command "PLANTORTHOANNOTATE" pause "Support Annotation [Tag]" pause "")
)
(princ))

 

If I chose the "SUPPORTS" everything is OK, but if by chance I chose “Valve” or “Pipes”, then Lisp will stop the response (freezing).Please tell me how to change the LISP text.

0 Likes
Message 6 of 7

jabowabo
Mentor
Mentor

The problem is that the LISP code is sending the command specific for support tag annotation. If you want to modify it to annotate other objects, you need to differentiate them and send the appropriate command. See below for an example that is conditional on the layer names - you will need to change the PLANTORTHOANNOTATE command parameter and/or layer names to suit your needs.

; [email protected]; 

(defun c:OrthoTagRepeat (/ e elay)
	(while t
		(if
			(and
				(setq e (car (entsel "\nSelect entity to tag: ")))
			)
			(progn
				(setq elay (strcase(cdr (assoc 8 (entget e)))))
				(cond
					(
						(wcmatch elay "*SUPPORTS*")
							(progn
								(command "PLANTORTHOANNOTATE" e "Support Annotation [Tag]" pause "")
								(command "mspace")
							)
					)
					(
						(wcmatch elay "*PIPING*")
							(progn
								(command "PLANTORTHOANNOTATE" e "Nominal Size [Size]" pause "")
								(command "mspace")
							)
					)
				)
			)
		)
	)
(princ)
)
Message 7 of 7

jusea
Participant
Participant

Jabowado

Thanks you.

Your code is working !!!

 

 

0 Likes