高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】entity attributes during vectorization
entity attributes during vectorization
entity attributes during vectorization
hi,
i am using the vectorization framework to import dxf/dwg files into my application(using dwgdirect 1.13.02).
i have the following queries regarding entity aatributes:
01. in exsimpleview:ntraitsmodified() function, the currtraits.lineweight() always return 0. ie. no matter what lineweight i set in dxf/dwg files in autocad, this value is always 0. why?
02. how can i access the hyperlink property of the entity that is going to be vectorized ?
03. during import i want entities to be vectorized as if they had continuous linetype. i think the way is to check in the exsimpleview::draw() function whether the entity has continuous linetype or not. if it is not, then i should modify the linetype property "somehow" to make it continuous.
i would also like to retain the original linetype so that after the entity is vectorized, i can apply the appropriate linetype.
can somebody provide an example of doing this.
thanks
--alex
looking into dwf export sample can be useful for your task.
1. one of possible reasons can be lwdisplay=0. does autocad display the lineweights in your case?
are you sure that currtraits.lineweight() returns zero or maybe the value becomes zero after converting to pixels by lineweighttopixels()?
2. you can access hyperlink in draw() function. see dwf export: oddwfview functions draw() and process_url().
3. disabling linetyping.
- linetypes are applied only in 2doptimized mode.
or
- you can override odgiviewport::linetypegenerationcriteria() to force effective linetype to continuous.
(odgsbasevectorizeview is derived from odgiviewport)
sergey slezkin
|