Jump to content

Custom properties


supertxull

Recommended Posts

I would like to create a lisp file to add custom properties to my drawings (also Sheet Set properties if it's possible).

Where can I find information about it?

I would need to create a property name and its value.

Thank you in advance for your help.

1.PNG

2.PNG

Link to comment
Share on other sites

Below is the code I use to set custom properties:

 

; Custom dwg properties functions
(defun getCustomDwgProp (key / summaryInfo val)
	(setq summaryInfo (vla-get-summaryInfo (vla-get-activeDocument (vlax-get-acad-object))))
	(if (vl-catch-all-error-p (vl-catch-all-apply 'vla-getCustomByKey (list summaryInfo key 'val)))
		(setq val nil)
	)
	val
)
(defun setCustomDwgProp (key value / summaryInfo)
	(setq summaryInfo (vla-get-summaryInfo (vla-get-activeDocument (vlax-get-acad-object))))
	(if (getCustomDwgProp key)
		(vla-setCustomByKey summaryInfo key value)
		(vla-addCustomInfo summaryInfo key value)
	)
)

 

Edited by dexus
Link to comment
Share on other sites

(vl-load-com)(vlax-dump-object (vlax-get-property (vla-get-activedocument (vlax-get-acad-object)) 'Summaryinfo) t)

 

 

Copy this and Paste to the command prompt. 

you can modify the upper values with get-property/put-property (if that property is not read only) 

or you can use method in the methods supported list.

 

Edited by exceed
Link to comment
Share on other sites

  • 1 year later...

is there anyway to add a cumulative GPM count? i do sprinklers and it would help tremendously for zoning. i want to be able to select a group of heads with different gpm values and see their total gallon count similar to cumulative area for hatch

Link to comment
Share on other sites

What does this have to do with custom properties ?

 

Please Admin move to a new lisp request. 

 

For _Flawgic post a sample dwg.

Link to comment
Share on other sites

4 hours ago, BIGAL said:

What does this have to do with custom properties ?

TEST

 

Command: DWGPROPS

 

00.JPG

Link to comment
Share on other sites

Sorry  _Flawgic  post, is not relevant to Custom properties question.

 

Admin may fix.

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...