Author Topic: Naming LWPOLY Lines  (Read 3645 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Naming LWPOLY Lines
« on: June 19, 2016, 01:27:31 PM »
Anyone ever try using the DXF 310 value to name a LWPOLYLINE object.  I would like to try it to be able to quickly retrieve the vertex point coordinates of that particular LWPolyline.

Pros /Cons


MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #1 on: June 19, 2016, 02:03:19 PM »
Not knowing your exact need ... have you looked into exploiting groups? ... saving the handles of entities in dictionaries ... etc?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Naming LWPOLY Lines
« Reply #2 on: June 19, 2016, 02:14:56 PM »
Not knowing your exact need ... have you looked into exploiting groups? ... saving the handles of entities in dictionaries ... etc?

MP,

Thanks for the input, I need to be able to retrieve the vertex information in subsequent editing sessions (after exiting Cad etc.) so as far as I know the groups method is out.  In this application the LWPOLYLINE is within a block, and there could be multiple similar blocks (not copies of the same one) in a single drawing, so I am leary of using the dictionary option in this case.  I do use dictionaries extensively for other purposes, I have over a hundred values etc stored in custom dictionaries in each drawing. The other option I was thinking about was creating an invisible attribute while creating the block to store the entity name.


MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #3 on: June 19, 2016, 03:31:32 PM »
If the entities of interest weren't nested in blocks groups could work session to session. That said, you would still need some means to store the group name (or use a consistently named group). As the entities are nested within blocks you either have to record the handles in a dictionary (what I'd likely do) or flag the entities via xdata or an extension dictionary. Recording the handles in a dictionary would realize faster retrieval after the fact, as you wouldn't have to iterate block definitions looking for flagged entities. I personally would not go the route of an attribute; too easily abused and/or revealed, invisible or not. Don't know if this was coherent, I've a smashing headache today. fwiw cheers.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Naming LWPOLY Lines
« Reply #4 on: June 19, 2016, 03:57:19 PM »
with gc 310 aren't you restricted to hex values?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #5 on: June 19, 2016, 04:08:21 PM »
70 72 6F 62 6C 65 6D 3F
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Naming LWPOLY Lines
« Reply #6 on: June 19, 2016, 07:28:21 PM »

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #7 on: June 19, 2016, 10:59:58 PM »
 :whistling:  :2funny:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Naming LWPOLY Lines
« Reply #8 on: June 20, 2016, 12:17:20 AM »

I usually name mine after Homers characters. The Greek is conducive to some excellent puns.
 
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #9 on: June 20, 2016, 12:44:32 AM »
Not a pun but 'Hector the vector' quickly springs to mind for some reason.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Naming LWPOLY Lines
« Reply #10 on: June 20, 2016, 03:27:45 AM »
70 72 6F 62 6C 65 6D 3F
Since the OP doesn't refer to hex values I was wondering if gc 310 will accept any string. Note: BricsCAD does not allow gc 310 values for 'standard' graphical entities.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Naming LWPOLY Lines
« Reply #11 on: June 20, 2016, 07:04:02 AM »
I haven't attempted this yet, just in reviewing the acad docs, thought that 310 was a usable gc that one could use for an LWPolyline ent. value.  I will attempt others also to find one that works in both AC & BC.  I am looking to store a string, but if needs to be converted to hex. thats would work also.  MP thanks for the ideas, I'm with you on the attributes, much to easy for the curious user to mess with.

I'll try using the gc 102 series of codes and see what happens, I know (if successful) that it would work in Bricscad as well, a requite detail.

I'll post the results back here.
« Last Edit: June 20, 2016, 07:37:10 AM by snownut2 »

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Naming LWPOLY Lines
« Reply #12 on: June 20, 2016, 07:53:37 AM »
Personally, I would opt to store handles as MP has suggested above - handles are already a unique 'name' for every entity in a drawing.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Naming LWPOLY Lines
« Reply #13 on: June 20, 2016, 08:53:58 AM »
I haven't attempted this yet, just in reviewing the acad docs, thought that 310 was a usable gc that one could use for an LWPolyline ent. value.  I will attempt others also to find one that works in both AC & BC.  I am looking to store a string, but if needs to be converted to hex. thats would work also.  MP thanks for the ideas, I'm with you on the attributes, much to easy for the curious user to mess with.

I'll try using the gc 102 series of codes and see what happens, I know (if successful) that it would work in Bricscad as well, a requite detail.

I'll post the results back here.

Just to be clear -- those hex values were anted up in jest -- I would not use 310 data for the need you've floated herein -- period.

... record the handles in a dictionary ...

For the performance and the effort this is your best bet.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Naming LWPOLY Lines
« Reply #14 on: June 20, 2016, 09:29:12 AM »

-- those hex values were anted up in jest -- I would not use 310 data for the need you've floated herein -- period.


No problems.. thanks for input, I'll look at the handles in dict.